[FIX] tiki-installer.php: Fatal error: Uncaught TypeError: TikiDb::get():...
This is to fix the error Fatal error: Uncaught TypeError: TikiDb::get(): Return value must be of type TikiDb, null returned in /Applications/MAMP/htdocs/tiki/lib/core/TikiDb.php:59 Stack trace: #0 /Applications/MAMP/htdocs/tiki/installer/tiki-installer.php(284): TikiDb::get() #1 /Applications/MAMP/htdocs/tiki/tiki-install.php(139): include_once('/Applications/M...') #2 {main} thrown in /Applications/MAMP/htdocs/tiki/lib/core/TikiDb.php on line 59
with the page tiki-install.php on master branch.
The error is because the get()
function in the TikiDb
class returns null instead of an instance of TikiDb, which it shouldn't be doing according to its return type, so I suggest a check of the availability of the instance before using it in tiki-installer.php, with the use of TikiDb::isAvailable().