Menu

#815 AJAX calls failing , a warning appears in the ajax response

4.8.1
closed-duplicate
nobody
None
7
2025-02-19
2021-08-28
No

AJAX calls in table list fail when using adminer under latest PHP 8, and in the ajax json response appears the error:

Warning: Undefined variable $Ah in D:\WebServ\HttpRoot_libx\php\adminer-4.8.1_adminer.php on line 1787

Accessing undefined variables was a notice in previous php versions, but now is a warning, see:

https://www.php.net/manual/en/migration80.incompatible.php

So probably while notices where suppressed by default by adminer, warnings do not.

Adding @ in front of $Ah usage in row 1787 corrects that!

Discussion

  • Stephan

    Stephan - 2021-09-17

    This is probably a duplicate of Ticket #810

    Fine tune error_reporting in php.ini, this will help for now.

     
  • ShoresOfNowhere

    ShoresOfNowhere - 2021-09-17

    The other bug refers to a variable named $ag , this one refers to $Ah...

    Don't know if they're the very same bug.

    Also, I think in Php 8 this kind of problem has been always raised from notice to warning , and you either suppress all warnings (which can be too much) or really solve the bugs, since you can't only suppress this warning.

     
  • Jakub Vrána

    Jakub Vrána - 2025-02-19
    • status: open --> closed-duplicate
     

Log in to post a comment.

MongoDB Logo MongoDB