• Hello

    My Apache logs are filled with:

    [Wed Jun 08 12:31:58.689816 2016] [:error] [pid 23909] [client xxx] PHP Notice: Undefined offset: 0 in /home/xxx/public/xxx/wp/wp-content/plugins/w3-total-cache/lib/W3/Plugin/Minify.php on line 165

    WP 4.5.2 and W3TC 0.9.4.1

    Can I do something?

    BR and thanks!

    https://wordpress.org/plugins/w3-total-cache/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Ashok

    (@bappidgreat)

    Hi pietari-pate

    What is your php version?

    And would you please go to /home/xxx/public/xxx/wp/wp-content/plugins/w3-total-cache/lib/W3/Plugin/Minify.php on line 165 and replace
    &$this
    with
    $this

    Let us know if you get the notice then too.

    Have an awesome day!

    Cheers
    Ash

    Thread Starter pietari-pate

    (@pietari-pate)

    Not finding that.

    &$this appears only inside the run function. Three times in there.

    Ashok

    (@bappidgreat)

    You need to check line no 165. What do you see in there?

    Same problem.

    My line 165 is

    $embed_pos = strlen($match[0][0]) + $match[0][1];

    Ashok

    (@bappidgreat)

    Ahh yes, my bad, I am sorry, I was looking at wrong file.

    Would you please replace

    $embed_pos = strlen($match[0][0]) + $match[0][1];

    with the following?

    $embed_pos = isset( $match[0][0] ) && isset( $match[0][1] ) ? strlen($match[0][0]) + $match[0][1] : 0;

    Hope it helps 🙂 Please feel free to ask more question if you have any.

    Cheers
    Ash

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Err: undefined offset in Minify.php’ is closed to new replies.