Fixed Invalid argument supplied for foreach()

Divvens

Well-known member
This error keeps popping up when members try to "tag" other members in Media

PHP:
ErrorException: Invalid argument supplied for foreach() - library/XenGallery/Model/Media.php:2256
Generated By: Madonna, 2 minutes ago
Stack Trace
#0 /home/xxxxxx/public_html/library/XenGallery/Model/Media.php(2256): XenForo_Application::handlePhpError(2, 'Invalid argumen...', '/home/xxxxxx/...', 2256, Array)
#1 /home/xxxxxx/public_html/library/XenGallery/ControllerHelper/Media.php(272): XenGallery_Model_Media->canTagMedia(Array, NULL)
#2 /home/xxxxxx/public_html/library/XenGallery/ControllerPublic/Media.php(1486): XenGallery_ControllerHelper_Media->assertCanTagMedia(Array)
#3 /home/xxxxxx/public_html/library/XenForo/FrontController.php(351): XenGallery_ControllerPublic_Media->actionTagInput()
#4 /home/xxxxxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/xxxxxx/public_html/index.php(13): XenForo_FrontController->run()
#6 {main}
Request State
array(3) {
  ["url"] => string(320) "http://orojackson.com/index.php?xengallery/tag-input&media_id=7361&tag_x1=201&tag_y1=92&tag_x2=222&tag_y2=113&tag_width=21&tag_height=21&tag_multiplier=1&&_xfRequestUri=%2Fmedia%2Femt-mess-collab-w-castiel.7361%2F&_xfNoRedirect=1&_xfToken=1778%2C1455037592%2C5b06a93358330a1428ea8cf5c076cbc61060dbaa&_xfResponseType=json"
  ["_GET"] => array(13) {
    ["xengallery/tag-input"] => string(0) ""
    ["media_id"] => string(4) "7361"
    ["tag_x1"] => string(3) "201"
    ["tag_y1"] => string(2) "92"
    ["tag_x2"] => string(3) "222"
    ["tag_y2"] => string(3) "113"
    ["tag_width"] => string(2) "21"
    ["tag_height"] => string(2) "21"
    ["tag_multiplier"] => string(1) "1"
    ["_xfRequestUri"] => string(38) "/media/emt-mess-collab-w-castiel.7361/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(56) "1778,1455037592,5b06a93358330a1428ea8cf5c076cbc61060dbaa"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}

Anything to be fixed on my end?
 
I've spotted the cause of this, and simultaneously fixed it.

Easiest workaround for now is to change the user permissions for tags so there is no limit:

upload_2016-2-9_17-31-32.webp

Set that to 0 or Unlimited and the issue will go away.

Fixed for the next release though, thanks.
 
Back
Top Bottom