XF 1.5 error when installing 1.5.8

#1
Hello, I tried to install xenforo 1.5.8 to for testing in my local machine,

in step 2 of installation, I get this error every time;

count(): Parameter must be an array or an object that implements Countable
  1. XenForo_Application::handlePhpError() in XenForo/Install/Model/Install.php at line 278
  2. XenForo_Install_Model_Install->insertDefaultData() in XenForo/Install/Controller/Install.php at line 219
  3. XenForo_Install_Controller_Install->actionStep2() in XenForo/FrontController.php at line 351
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  5. XenForo_FrontController->run() in D:/xampp/htdocs/community/install/index.php at line 18
 

ozzy47

Well-known member
#4
Try downgrading the PHP to 7.1 or install XF version 1.5.19, alternatively there was a bug that was fixed in 1.5.19, you could manually edit a file.

In the file src/XF/Install/Upgrade/2000010-200a.php you will find this line:
PHP:
$permissionCache = @unserialize($admin['permission_cache']);
I believe all that's required is to change it to:
PHP:
$permissionCache = @unserialize($admin['permission_cache']) ?: [];
And then hit refresh and the process should continue.
 
Top