Duplicate array_fill(): Number of elements must be positive

Alan Hollis

New member
Hi guys,

One of our users got stuck unable to post a thread to a particular problem.
Server error logs show:

#0 [internal function]: XenForo_Application::handlePhpError(2, 'array_fill(): N...', '/srv/www/sites/...', 553, Array)
#1 /srv/www/sites/thefarmingforum.co.uk/public/library/XenForo/ControllerPublic/Forum.php(553): array_fill(0, 0, true)
#2 /srv/www/sites/thefarmingforum.co.uk/public/library/XenKingDir/ControllerPublic/Forum.php(10): XenForo_ControllerPublic_Forum->actionCreateThread()
#3 /srv/www/sites/thefarmingforum.co.uk/public/library/EWRatendo/ControllerPublic/Forum.php(7): XenKingDir_ControllerPublic_Forum->actionCreateThread()
#4 /srv/www/sites/thefarmingforum.co.uk/public/library/LiquidPro/SimpleForms/Listener/Proxy/ControllerForum.php(26): EWRatendo_ControllerPublic_Forum->actionCreateThread()
#5 /srv/www/sites/thefarmingforum.co.uk/public/library/XenForo/FrontController.php(347): LiquidPro_SimpleForms_Listener_Proxy_ControllerForum->actionCreateThread()
#6 /srv/www/sites/thefarmingforum.co.uk/public/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /srv/www/sites/thefarmingforum.co.uk/public/index.php(13): XenForo_FrontController->run()
#8 {main}

It looks like in this case, $poll['responses'] == 2 which causes array_fill to be array_fill(0,0,true). Which I believe is fine in PHP versions greater than 5.6 but we're on 5.5.9.

Xenforo Version: 1.4.3.
 
I have the same Problem with one member but not with a poll.
XF 1.4.3

Error message:

Code:
ErrorException: array_fill(): Number of elements must be positive - library/XenForo/ControllerPublic/Forum.php:553
Generiert durch: Phoebe2011, Gestern um 14:07 Uhr
Stapelverfolgung
#0 [internal function]: XenForo_Application::handlePhpError(2, 'array_fill(): N...', '/var/www/my-dom...', 553, Array)
#1 /var/www/my-domain/library/XenForo/ControllerPublic/Forum.php(553): array_fill(0, 0, true)
#2 /var/www/my-domain/library/Andy/SimilarThreads/ControllerPublic/Forum.php(13): XenForo_ControllerPublic_Forum->actionCreateThread()
#3 /var/www/my-domain/library/XenForo/FrontController.php(347): Andy_SimilarThreads_ControllerPublic_Forum->actionCreateThread()
#4 /var/www/my-domain/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /var/www/my-domain/index.php(13): XenForo_FrontController->run()
#6 {main}
Benötigter Status
array(3) {
  ["url"] => string(77) "http://www.my-domain.de/blabla/probleme-mit-dem-hund.46/create-thread"
  ["_GET"] => array(1) {
    ["/blabla/probleme-mit-dem-hund_46/create-thread"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
Top Bottom