Menu

#822 undefined variable warning

Git
open
nobody
None
5
2022-01-16
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

     

Log in to post a comment.