Title: Warning: strpos() [function.strpos]: Empty delimiter
Last modified: August 21, 2016

---

# Warning: strpos() [function.strpos]: Empty delimiter

 *  [Riccardo](https://wordpress.org/support/users/rdmgrl/)
 * (@rdmgrl)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/)
 * i’ve installed the plugin now, and this is the message:
 * Warning: strpos() [function.strpos]: Empty delimiter in /wp-content/plugins/better-
   wp-security/lib/icon-fonts/init.php on line 20
 * Warning: strpos() [function.strpos]: Empty delimiter in /wp-content/plugins/better-
   wp-security/lib/icon-fonts/init.php on line 29
 * what’s the problem?
 * [https://wordpress.org/plugins/better-wp-security/](https://wordpress.org/plugins/better-wp-security/)

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

 *  [Chris Jean](https://wordpress.org/support/users/chrisjean/)
 * (@chrisjean)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746064)
 * Sorry for the trouble rdmgrl. Is it possible that you have a custom-defined ABSPATH
   on the site? If so, do you have the value set to a blank string by any chance?
 *  [Dominik Kocuj](https://wordpress.org/support/users/domko/)
 * (@domko)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746082)
 * I have the same error.
 * I’ve looked into the code of your plugin and I see that in file lib/icon-fonts/
   init.php you’re getting the ABSPATH and then you’re trimming it by removing the“/”
   characters. However, because I have the website in the main directory, I have
   the ABSPATH = “/”. So, when you remove this character and then you make a “strpos()”
   with this as the second parameter, the “strpos()” function will show these errors.
 *  [Chris Jean](https://wordpress.org/support/users/chrisjean/)
 * (@chrisjean)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746110)
 * I can see that happening with an ABSPATH of just a ‘/’, but I wonder why it would
   be done that way. As given by the name, ABSPATH is meant to be an absolute path
   and not a relative one.
 * The specific section of code that is having problems is there to generate a URL
   to plugin resources. While I can add a check for an empty ABSPATH after stripping
   the “/”, the code would fail to function correctly as it needs an actual absolute
   path in order to properly generate the URL.
 *  [Dominik Kocuj](https://wordpress.org/support/users/domko/)
 * (@domko)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746131)
 * In hosting, where I have all my websites, files and directories in each domain
   and subdomain are treated like in the root (“/”) path. So, the ABSPATH = “/” 
   is correct.
 * For example, in this hosting if I have a directory:
    “/mywebsite” and domain “
   [http://mywebsite.com&#8221](http://mywebsite.com&#8221); which is set to this
   directory, then all directories and files in “/mywebsite” will be treated as 
   if they are in the root directory, for example, URL “[http://mywebsite.com/something.php&#8221](http://mywebsite.com/something.php&#8221);
   will execute script at “/mywebsite/something.php”. Furthermore, from script point
   of view the “/mywebsite” directory does not exists – all inside is treated like
   in root path (“/”).
 * So if you need this to generate some URL, I think it should be ok in this case.
   For example, URL:
    “[http://somedomain.com&#8221](http://somedomain.com&#8221);.
   $abspath.”/something.php” where $abspath is ABSPATH after trimming in your plugin(
   by eliminating “/”), will be ok in my case, because it will be: “[http://somedomain.com/something.php&#8221](http://somedomain.com/something.php&#8221);
   and it is correct URL.
 * This is how it works in my case.
 *  [Chris Jean](https://wordpress.org/support/users/chrisjean/)
 * (@chrisjean)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746146)
 * It occurred to me after posting that different setups, such as chroot, may end
   up with a true ABSPATH of “/”. I’m currently working on an update that will account
   for such setups. I’ll also have to run a number of tests to ensure that the change
   won’t cause any unexpected behavior.
 *  [Dominik Kocuj](https://wordpress.org/support/users/domko/)
 * (@domko)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746158)
 * Thank you.
 *  [Chris Jean](https://wordpress.org/support/users/chrisjean/)
 * (@chrisjean)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746172)
 * I have a modification that should fix the issue. Given that I don’t have a reliable
   system that replicates these conditions, would one of you be willing to try out
   the modification and confirm or deny that it fixes the issue?
 * If so, you can download the modified file
    [here](http://gaarai.com/temp/init.php.zip).
   It will need to be unzipped first. Then the `init.php` file from the zip will
   need to replace the `better-wp-security/lib/icon-fonts/init.php` file.
 *  [Dominik Kocuj](https://wordpress.org/support/users/domko/)
 * (@domko)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746179)
 * I’ve checked it and it works. All warnings are gone.
 *  [Chris Jean](https://wordpress.org/support/users/chrisjean/)
 * (@chrisjean)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746182)
 * Excellent. I’ll work with Chris, the main developer behind iThemes Security, 
   and get an updated release out shortly.
 * Thanks for the great feedback.
 *  [Chris Jean](https://wordpress.org/support/users/chrisjean/)
 * (@chrisjean)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746192)
 * It looks like an updated version will be released tomorrow. This new version 
   will include the fix talked about here.

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

The topic ‘Warning: strpos() [function.strpos]: Empty delimiter’ is closed to new
replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=3529351)
 * [Kadence Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [Chris Jean](https://wordpress.org/support/users/chrisjean/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/warning-strpos-functionstrpos-empty-delimiter-1/#post-4746192)
 * Status: not resolved