xenporta and php 5.4.7 ???

andrewkm

Active member
Having the following issue with xenporta blocks on my forum.

Clicking recent news block to configure options gives me:
An exception occurred: Array to string conversion in /home/andymidu/public_html/forum/library/XenForo/Model/Node.php on line 1255
  1. XenForo_Application::handlePhpError()
  2. strval() in XenForo/Model/Node.php at line 1255
  3. XenForo_Model_Node->getNodeOptionsArray() in EWRporta/Option/ForumChooser.php at line 16
  4. EWRporta_Option_ForumChooser::renderOption()
  5. call_user_func() in XenForo/ViewAdmin/Helper/Option.php at line 327
  6. XenForo_ViewAdmin_Helper_Option::_renderCallbackOptionHtml() in XenForo/ViewAdmin/Helper/Option.php at line 71
  7. XenForo_ViewAdmin_Helper_Option::renderPreparedOptionHtml() in XenForo/ViewAdmin/Helper/Option.php at line 33
  8. XenForo_ViewAdmin_Helper_Option::renderPreparedOptionsHtml() in EWRporta/ViewAdmin/BlockOptions.php at line 21
  9. EWRporta_ViewAdmin_BlockOptions->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 215
  10. XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlAdmin.php at line 63
  11. XenForo_ViewRenderer_HtmlAdmin->renderView() in XenForo/FrontController.php at line 533
  12. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
  13. XenForo_FrontController->run() in /home/andymidu/public_html/forum/admin.php at line 13
Clicking recent news block to configure options gives me:
An exception occurred: Array to string conversion in /home/andymidu/public_html/forum/library/XenForo/Model/Node.php on line 1255
  1. XenForo_Application::handlePhpError()
  2. strval() in XenForo/Model/Node.php at line 1255
  3. XenForo_Model_Node->getNodeOptionsArray() in EWRporta/Option/ForumChooser.php at line 16
  4. EWRporta_Option_ForumChooser::renderOption()
  5. call_user_func() in XenForo/ViewAdmin/Helper/Option.php at line 327
  6. XenForo_ViewAdmin_Helper_Option::_renderCallbackOptionHtml() in XenForo/ViewAdmin/Helper/Option.php at line 71
  7. XenForo_ViewAdmin_Helper_Option::renderPreparedOptionHtml() in XenForo/ViewAdmin/Helper/Option.php at line 33
  8. XenForo_ViewAdmin_Helper_Option::renderPreparedOptionsHtml() in EWRporta/ViewAdmin/BlockOptions.php at line 21
  9. EWRporta_ViewAdmin_BlockOptions->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 215
  10. XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlAdmin.php at line 63
  11. XenForo_ViewRenderer_HtmlAdmin->renderView() in XenForo/FrontController.php at line 533
  12. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
  13. XenForo_FrontController->run() in /home/andymidu/public_html/forum/admin.php at line 13
.........
Could this have something to do with the fact I just updated to php 5.4.7
 
Try this

Jaxel: As you know, I use ForumChooser.php in an add-on (with your kind permission) and someone running PHP 5.4 received this issue also.

The way I have fixed it for them is to remove the red code from Option/ForumChooser.php:

Rich (BB code):
$forumOptions = $nodeModel->getNodeOptionsArray($nodeModel->getAllNodes(), $preparedOption['option_value'], '(unspecified)');

This may not work for some of your add-ons but for my particular add-on there's no need to have an "unspecified" option so removing that isn't a big deal.
 
Back
Top Bottom