[Bug 263759] databases/phppgadmin PHP 8.0 issues

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 03 May 2022 18:45:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263759

            Bug ID: 263759
           Summary: databases/phppgadmin PHP 8.0 issues
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: dinoex@FreeBSD.org
          Reporter: gessel@blackrosetech.com
             Flags: maintainer-feedback?(dinoex@FreeBSD.org)
          Assignee: dinoex@FreeBSD.org

databases/phppgadmin has issues with PHP 8.0 even though there's a 8.0 flavor. 

Login fails with "Virtual Class -- cannot instantiate" 

This has been reported - it doesn't seem FreeBSD specific:
https://stackoverflow.com/questions/65299248/phppgadmin-login-fail-virtual-class-cannot-instantiate. 

(@hericklr's isn't optimal)

@ormorph proposed a patch, it seems to work:

https://github.com/phppgadmin/phppgadmin/issues/119#issuecomment-801712145

--- adodb-postgres64.inc.php.bak        2022-05-03 10:42:54.773501000 -0700
+++ adodb-postgres64.inc.php    2022-05-03 10:47:32.151320000 -0700
@@ -122,7 +122,12 @@
        // changes the metaColumnsSQL, adds columns: attnum[6]
        }

-       function ServerInfo()
+       function __construct()
+       {
+       // changes the metaColumnsSQL, adds columns: attnum[6]
+       }
+       
+        function ServerInfo()
        {
                if (isset($this->version)) return $this->version;

--- all_db.php.bak      2022-05-03 10:37:26.866823000 -0700
+++ all_db.php  2022-05-03 10:42:04.130932000 -0700
@@ -199,7 +199,7 @@
                echo "\t\t<td class=\"data1\">\n";
                echo "\t\t\t<select name=\"formEncoding\">\n";
                echo "\t\t\t\t<option value=\"\"></option>\n";
-               while (list ($key) = each ($data->codemap)) {
+                foreach ($data->codemap as $key => $value) {
                    echo "\t\t\t\t<option value=\"", htmlspecialchars($key),
"\"",
                                ($key == $_POST['formEncoding']) ? '
selected="selected"' : '', ">",
                                $misc->printVal($key), "</option>\n";

-- 
You are receiving this mail because:
You are the assignee for the bug.