• Resolved paschoolboards

    (@paschoolboards)


    Trying to access array offset on value of type bool in /home/xxxxxxxx/site/wp-content/plugins/pods/classes/PodsI18n.php on line 469

    This is showing up a lot in my debug logs. I patched it by just using isset() to check beforehand, but since the call is made a lot, unpatched, you just get a debug log full of array offset messages.

    Not critical, but just an annoyance

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Bernhard Gronau

    (@quasel)

    Hi @paschoolboards,

    can you share the code you used, else it’s hard to give feedback!

    Thanks
    Bernhard

    Thread Starter paschoolboards

    (@paschoolboards)

    469: self::$current_language = $lang_data[‘language’];

    changed to:

    469: self::$current_language = isset($lang_data[‘language’]) ? $lang_data[‘language’] : ”;

    i used isset since array_key_exists has been deprecated

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @paschoolboards

    It looks like you are using an older version of Pods.
    https://github.com/pods-framework/pods/blob/main/classes/PodsI18n.php#L469

    Also, as you can see in the code, language is a key that always exists unless something else overwrites the variable through the filter. However, even then, the language is a required param as per the documentation so the filter should be fixed, not this code.

    Please update to the latest version and let me know!

    Cheers, Jory

    Thread Starter paschoolboards

    (@paschoolboards)

    odd. i see that it was committed and verified in dec of 2019, but i have 2.7.26.2 according to wordpress, but i’m nt seeing this update. I ended up have to completely remove pods and reinstall it manually

    Plugin Author Jory Hogeveen

    (@keraweb)

    Probably an error while updating to the latest version.
    Good to hear it works now!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Array Offset Not Found’ is closed to new replies.