Fixed Error Exception

Mr Lucky

Well-known member
I am getting a few of these:
Code:
ErrorException: Undefined index: user_id - library/XenGallery/Model/Album.php:1700

Generated By: Sunray, Today at 3:20 PM

Stack Trace

#0 /home/xxxxxx/public_html/library/XenGallery/Model/Album.php(1700): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/xxxxxx/publi...', 1700, Array)

#1 /home/xxxxxx/public_html/library/XenGallery/Model/InlineMod/Album.php(60): XenGallery_Model_Album->canDeleteAlbum(Array, 'soft', NULL, Array)

#2 /home/xxxxxx/public_html/library/XenGallery/Model/InlineMod/Album.php(35): XenGallery_Model_InlineMod_Album->canDeleteAlbumData(Array, 'soft', NULL, NULL)

#3 /home/xxxxxx/public_html/library/XenGallery/ControllerPublic/InlineMod/Album.php(43): XenGallery_Model_InlineMod_Album->canDeleteAlbum(Array, 'soft', NULL)

#4 /home/xxxxxx/public_html/library/XenForo/FrontController.php(347): XenGallery_ControllerPublic_InlineMod_Album->actionDelete()

#5 /home/xxxxxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))

#6 /home/xxxxxx/public_html/index.php(13): XenForo_FrontController->run()

#7 {main}

Request State

array(3) {

  ["url"] => string(55) "http://cafesaxophone.com/media/albums-inline-mod/switch"

  ["_GET"] => array(0) {

  }

  ["_POST"] => array(6) {

    ["album"] => array(1) {

      [0] => string(2) "21"

    }

    ["a"] => string(6) "delete"

    ["_xfRequestUri"] => string(30) "/media/users/sunray.713/albums"

    ["_xfNoRedirect"] => string(1) "1"

    ["_xfToken"] => string(8) "********"

    ["_xfResponseType"] => string(4) "json"

  }

}

Any idea what this is? Thanks
 
It's a bug. I've just fixed it for the next version.

If you want to fix it yourself you can do so by editing this file:
library/XenGallery/Model/Album.php

Find:
PHP:
else if ($album['user_id'] == $viewingUser['user_id'] && XenForo_Permission::hasPermission($viewingUser['permissions'], 'xengallery', 'deleteAlbum'))

Replace:
PHP:
else if ($album['album_user_id'] == $viewingUser['user_id'] && XenForo_Permission::hasPermission($viewingUser['permissions'], 'xengallery', 'deleteAlbum'))

Specifically this error is happening if a normal user attempts to delete one of their albums using the inline moderation feature.
 
Top Bottom