• Warning: mb_stristr(): Empty delimiter in /path/to/site/wp-content/plugins/w3-total-cache/lib/W3/PgCache.php on line 852

    Code on this line:

    foreach ($compressions as $compression) {
      if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && stristr($_SERVER['HTTP_ACCEPT_ENCODING'], $compression) !== false) {
        return $compression;
      }
    }

    In $compressions array first element is false. I think stristr function does not allow falsy arguments.

    php -v:
    5.5.9-1ubuntu4.11 with Zend OPcache v7.0.3 and Xdebug v2.3.2

    Ubuntu 14.04

    https://www.ads-software.com/plugins/w3-total-cache/

Viewing 1 replies (of 1 total)
  • Thread Starter imposibrus

    (@imposibrus)

    Well, maybe problem in my local development environment, but i found quick dirty hack:
    replace line 852 with:

    if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && $compression && mb_stristr($_SERVER['HTTP_ACCEPT_ENCODING'], $compression, 'UTF-8') !== false) {

Viewing 1 replies (of 1 total)
  • The topic ‘mb_stristr(): Empty delimiter’ is closed to new replies.