Archived topic
error after update to 1.3.23: strpos(): empty needle in /media.php on line 1088
28 replies · Started by Sven on January 18, 2016
Hi Tom,
yesterday I updated my GP-theme as you published a new version. Since then I encounter an error on my front page (where I use sections):
"Warning: strpos(): Empty needle in /homepages/sven-koeck.de/wp-includes/media.php on line 1088"
There appear 6 lines of identical content.
I deactivated all plugins and GP Premium and GP-add ons. My start page uses sections so I only activated GP Premium with add-ons (sections only) and tada: the error appears!
Could you please take a look at your theme files (especially media.php)? I appreciate your answer!
Best regards,
Sven
Hi there,
media.php is actually a WordPress file, and 1.3.23 has been out since December 21.
What version of GP Premium are you using?
Can you try #1 on this page to see if it's another plugin causing the issue?: https://generatepress.com/knowledgebase/debugging/
GP Premium 1.2.74
I have deactivated ALL plugins and only activated GP PREMIUM and SECTIONS --> error!
WP: 4.4.1
Can you try updating to the latest version of GP Premium (1.2.79)?
GP premium updated to 1.2.79 --> error persists
(please also notice my personal mail to you concerning activating email)
Hi Tom,
I installed Theme Twenty Sixteen and changed into live-preview. There were some error messages:

Perhaps they're the problem and you can interpret an correct them?
Sven
link to error screenshot: http://sven-koeck.de/wp-content/uploads/twenty16_live_preview_error1.jpg
Solved it!!!
I'm using the Lighweight Grid Column plug-in. I had eight images with class-attributes ==> 8 error lines.
First I suspected the LGC-plug-in, but it were the class-attributes to the corresponding images... deleted one ==> 7 error lines.
Deleted all class-attributes... and the error is gone! :-)
Do you have an explanation for that beahaviour? Or at least a suspicion?
Sven
That is very strange - typically, HTML errors shouldn't create PHP warnings/errors.
Either way, I'm glad it's fixed now :)
For me this error is still present:
"Warning: strpos() [function.strpos]: Empty needle in /home/depende/public_html/wp-includes/media.php on line 1088"
If I return to this line in 1088 ($src_matched &&) in media.php from "false" to "true" the error error disappears...
// If the file name is part of thesrc`, we've confirmed a match.
if ( ! $src_matched && true !== strpos( $image_src, $dirname . $image['file'] ) ) {
$src_matched = true;
}
Any suggestions?
Hi Marco,
on my blog page (as well as in the posts itselves) that error message appears above the featured image any time I use too small images...
I have set the basic width of any featured image in my posts to 1200x800, so the error appears after using images which are smaller. As soon as I use larger images, the error disappears!
Hope that can probably help you!?
Sven
Hi Marco,
on my blog page (as well as in the posts itselves) that error message appears above the featured image any time I use too small images…
I have set the basic width of any featured image in my posts to 1200×800, so the error appears after using images which are smaller. As soon as I use larger images, the error disappears!
Hope that can probably help you!?
Sven
Hi Sven, because on pages 4 and 5 of your site I see this error again?
See: http://sven-koeck.de/blog/page/4
It seems some others are having this issue as well: https://wordpress.org/support/topic/warning-strpos-empty-needle-above-images
I'm wondering if it's a WordPress 4.4 issue? I haven't experienced it yet on any of my sites. Maybe it's server related?
I think so, it started with 4.4.1... any workaround for now?
