• Hello

    Is there any way to fix this error please , which is flooding the logs files:

    Cannot access offset of type string on string in …../content/plugins/wp-pagenavi/core.php:276

    Line 276: $attr[‘href’] = $this->get_url( $page );

    Running PHP 8.0

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Lester Chan

    (@gamerz)

    My gut feeling it is not a PHP 8 problem but a conflict a plugin (might need your help to pinpoint). Because on PHP 7, you will get Illegal string offset as well (reported by some user, I asked him to help debug but have not gotten back an answer)

    Illegal string offset ‘href’ means someone is passing $attr as a string instead of an array. I checked all calls to that function in the plugin, and all of them are passing it as an array.

    So might gut feel is somewhere outside the plugin is calling this function.

    Thread Starter treecutter

    (@treecutter)

    Hello Lester

    You are absolutely correct, found some bad code in functions.php

    Thanks for the prompt reply, and excellent support , highly appreciated !!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Fatal error’ is closed to new replies.