Title: Problem PHP Warning: strpos
Last modified: August 31, 2016

---

# Problem PHP Warning: strpos

 *  [collare](https://wordpress.org/support/users/collare/)
 * (@collare)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/problem-php-warning-strpos/)
 * Hi,
    after upgrade to wordpress 4.4.1 in my error_log_php file I found a lot 
   of these errors:
 * PHP Warning: strpos() [[function.strpos](https://wordpress.org/support/topic/problem-php-warning-strpos/function.strpos?output_format=md)]:
   Empty needle in /home/****/public_html/wp-includes/media.php on line 1088
 * What is it?
 * Thank you

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [GrandMa90](https://wordpress.org/support/users/grandma90/)
 * (@grandma90)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/problem-php-warning-strpos/#post-6933394)
 * From the PHP Manual, the “strpos” determines the position of a string. It looks
   like this:
 * `strpos ( string $haystack , $needle [, int $offset = 0 ] )`
 * At line 1088 in media.php you have this:
 * `// If the file name is part of the`src`, we've confirmed a match.`
    `if ( ! 
   $src_matched && false !== strpos( $image_src,` $dirname . $image[‘file’] ) ) {``
   $src_matched = true;` `}`
 * So the $needle is the $dirname. That means that the folder where the media is
   located cannot be found. It’s most likely a bug, because no errors are thrown,
   only warnings.
 *  Thread Starter [collare](https://wordpress.org/support/users/collare/)
 * (@collare)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/problem-php-warning-strpos/#post-6933400)
 * Hi,
    thank you for answer. I hope in a new wordpress update.
 *  [Bloggd](https://wordpress.org/support/users/rameshmvp/)
 * (@rameshmvp)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/problem-php-warning-strpos/#post-6933747)
 * Editing wp-config and including the following line did it for me:
 * `@ini_set('display_errors', 0);`
 * Blogged: [WordPress Error “Empty needle” in media.php Line 1088. How to Hide the Warning Message in Web Pages?](http://www.winhelponline.com/blog/wordpress-error-empty-needle-media-php-1088-hide-in-web-pages/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problem PHP Warning: strpos’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Bloggd](https://wordpress.org/support/users/rameshmvp/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/problem-php-warning-strpos/#post-6933747)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
