I’m getting this PHP error after upgrading to PHP 8:
Error: Undefined constant "Api" in /home/xxxxxx/public_html/api-res/data.php:74
And the 74 line of data.php is this:
if ($State -> dbStruct && isset(Api_Db::$list[$State -> db])) {
$State -> dbStruct is a non-empty array, Api_Db::$list is a static array of class Api_Db, and $State -> db is a plain string of db name.
Tried to use absolute namespace ApiApi_Db but it didn’t work.
What’s wrong here? It’s really a weird error?
======
When I switch back to PHP 7.2, it gives this error instead:
ErrorException: Use of undefined constant - assumed '' (this will throw an Error in a future version of PHP) in /home/datacty/public_html/api-res/data.php:74
What does this mean? There’s no constant in that line.