Menu

#822 undefined variable warning

Git
closed-fixed
nobody
None
5
2025-02-19
2021-11-05
Marc
No

Undefined variable $dg in adminer-mysql.php on line 868

code excerpt:
json_row("$z-$E",($z=="Rows"&&$X&&$R["Engine"]==($dg=="p gsql"?"table":"InnoDB")

Discussion

  • adrianbj

    adrianbj - 2021-11-26

    I am also seeing this on the latest version on PHP 8.

     
  • SilverSlice

    SilverSlice - 2021-12-23

    Fixed in PR #450

     
  • Antonio Masotti

    Antonio Masotti - 2022-01-16

    Is this related to the problem I'm having in adminer/script.inc.php ?

    There there is a similar ternary check:

    json_row("$key-$name", ($key == "Rows" && $val && $table_status["Engine"] == ($sql == "pgsql" ? "table" : "InnoDB")
                            ? "~ $val"
                            : $val
                        ));
    

    which is throwing the following warning in PHP 8:

    [16-Jan-2022 09:22:30 UTC] PHP Warning:  Undefined variable $sql .../web/vendor/vrana/adminer/adminer/script.inc.php on line 15
    

    Or do I have to adjust something else?

     
  • Antonio Masotti

    Antonio Masotti - 2022-01-16

    P.s: This was my first post on SourceForge, please forgive me if I did something wrong and (maybe) I had to open a new post

     
  • Jakub Vrána

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

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.