• Resolved Bluemad

    (@bluemad)


    It seems that this plugin case Fatal error causes an error in PHP8.1. Please correct it as soon as possible.

    Fatal error: Array and string offset access syntax with curly braces is no longer supported in /wp-content/plugins/ads-for-wp/admin/inc/Google/Utils.php on line 67

    After I changed the following code in line 67, (replace curly bracket with box bracket)

    $ordinalValue = ord($strdomain{$ret}domain);

    to

    $ordinalValue = ord($strdomain[$ret]domain);

    After that changes this WordPress backend the Fatal error message disappeared. But I do not know how much is it correct? (I’m not a PHP expert, just found it Googling).

    • This topic was modified 2 years, 8 months ago by Bluemad.
    • This topic was modified 2 years, 8 months ago by Bluemad.
    • This topic was modified 2 years, 8 months ago by Bluemad.
    • This topic was modified 2 years, 8 months ago by Bluemad.
    • This topic was modified 2 years, 8 months ago by Bluemad.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Magazine3

    (@magazine3)

    We’re working on this fix and will push an update in a day or two

    Plugin Author Magazine3

    (@magazine3)

    We fixed this in our latest update 1.9.17. Can you please check it once by updating the Adsforwp to the latest version and let me know back if it fixed or not ?

    Thread Starter Bluemad

    (@bluemad)

    Hi,

    Thank you for your support. Now it shows the following PHP warnings.

    [Apr 23, 07:13:24] PHP Warning:  Attempt to read property "ID" on null in /wp-content/plugins/ads-for-wp/view/placement.php on line 420
    [Apr 23, 07:25:53] PHP Warning:  Attempt to read property "ID" on null in /wp-content/plugins/ads-for-wp/view/placement.php on line 420
    [Apr 23, 07:25:53] PHP Warning:  Attempt to read property "ID" on null in /wp-content/plugins/ads-for-wp/view/placement.php on line 420
    [Apr 23, 07:25:53] PHP Warning:  Attempt to read property "ID" on null in /wp-content/plugins/ads-for-wp/view/placement.php on line 420
    [Apr 23, 07:39:28] PHP Warning:  Attempt to read property "ID" on null in /wp-content/plugins/ads-for-wp/view/placement.php on line 420
    [Apr 23, 07:39:28] PHP Warning:  Attempt to read property "ID" on null in /wp-content/plugins/ads-for-wp/view/placement.php on line 420
    [Apr 23, 07:39:28] PHP Warning:  Attempt to read property "ID" on null in /wp-content/plugins/ads-for-wp/view/placement.php on line 420

    @bluemad We will sort this out in the next update: https://github.com/ahmedkaludi/ads-for-wp/issues/359

    Plugin Author Magazine3

    (@magazine3)

    We recently fixed it in our latest update 1.9.18. Can you please check it once by updating the AdsforWP to the latest version and let me know back?

    Thread Starter Bluemad

    (@bluemad)

    Yes, I can confirm that this issue is not fixed. I cannot see any error or warning.

    Plugin Author Magazine3

    (@magazine3)

    Are you saying that the update has not fixed your issue?

    Thread Starter Bluemad

    (@bluemad)

    OMG. It is typing mistake. ?? ?? Latest update fixed my issue. Sorry for the mistake. Thank you for the update.

    Plugin Author Magazine3

    (@magazine3)

    It’s ok, glad to hear the issue is fixed. If you have any other issues or queries please create a new topic.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP 8.1 Fatal error: Array and string offset access syntax with curly braces’ is closed to new replies.