• Resolved frahil

    (@frahil)


    Hallo,
    I want to migrate my website from PHP 7.4 to PHP 8.3.21. But chatgpt says: Several problem areas – these are deprecated constructs: 4× Problematic count($var) == 0, where $var may be null.
    ⛔ PHP 8.0+ throws an error here if $var is not an array or Countable object.
    → Files: AsaCollectionImport.php, AsaCore.php

    1× Use of each()
    → File: lib/AsaZend/Cache/Backend.php
    ❌ This will generate a fatal error in PHP 8.
    Could you please change this?
    Thank you!
    Regards
    Frank

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

    (@worschtebrot)

    Hi Frank,
    thank you for your request. Are you sure you are using an up-to-date version of ASA1. It has been compatible with PHP8 for years!
    Look at the file from your message in the current version: https://plugins.svn.ww.wp.xz.cn/amazonsimpleadmin/tags/1.6.0/lib/AsaZend/Cache/Backend.php

    The only place with an “each” is in the commented-out line 82 that was adapted years ago for PHP8 compatibility.

    I think that ChatGPT can distinguish comments from executable code. If this message refers to the commented out code, that would be another example of a useless bug report generated by an AI.

    However, if you are using a very old version, it is not ChatGPT’s fault. Then the solution is to install the latest update of ASA1. 🙂

    Thread Starter frahil

    (@frahil)

    Hello Timo,
    Thank you very much for the quick reply.
    Best regards,
    Frank

    • This reply was modified 10 months, 1 week ago by frahil.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Migration’ is closed to new replies.