1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Alert error?

Discussion in 'Resolved Bugs' started by PERuss, Sep 21, 2014.

  1. PERuss

    PERuss Member Xen Notices

    Trying to upload a file and getting this error:

    It happens when I'm trying to push out an update.
    Just curious how/why I'm getting this, thanks Chris.

    After more testing it appears it's specific to a single product of mine, Fusion Gamer.

    I've tried uploading the exact same file on 5 other products and it all works but not on here, hmmmm!
    Last edited: Sep 21, 2014
  2. PERuss

    PERuss Member Xen Notices

    This is what's showing in the server log:

    Error Info
    ErrorException:Argument 1 passed to XenForo_Model_Alert::userReceivesAlert() must be of the type array, null given, called in /home/xxxxxxxx/public_html/test/library/XenProduct/DataWriter/Version.php on line 159 and defined -library/XenForo/Model/Alert.php:518
    Generated By:Russ,A moment ago
    Stack Trace
    #0 /home/xxxxxxxx/public_html/test/library/XenForo/Model/Alert.php(518): XenForo_Application::handlePhpError(4096, 'Argument 1 pass...', '/home/xxxxxxxx/...', 518, Array)
    #1 /home/xxxxxxxx/public_html/test/library/XenProduct/DataWriter/Version.php(159): XenForo_Model_Alert::userReceivesAlert(NULL, 'xenproduct_vers...', 'update')
    #2 /home/xxxxxxxx/public_html/test/library/XenForo/DataWriter.php(1409): XenProduct_DataWriter_Version->_postSave()
    #3 /home/xxxxxxxx/public_html/test/library/XenProduct/ControllerPublic/Version.php(109): XenForo_DataWriter->save()
    #4 /home/xxxxxxxx/public_html/test/library/XenForo/FrontController.php(347): XenProduct_ControllerPublic_Version->actionSave()
    #5 /home/xxxxxxxx/public_html/test/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /home/xxxxxxxx/public_html/test/index.php(13): XenForo_FrontController->run()
    #7 {main}
    Request State
    array(3) {
    ["url"] => string(48) "https://pixelexit.com/test/products/version/save"
    ["_GET"] => array(0) {
    ["_POST"] => array(10) {
    ["version_string"] => string(6) "1.1.45"
    ["version_details_html"] => string(11) "<p><br></p>"
    ["_xfRelativeResolver"] => string(60) "https://pixelexit.com/test/products/version/add?product_id=2"
    ["changelog"] => array(1) {
    [0] => array(2) {
    ["item"] => string(0) ""
    ["visible"] => string(1) "1"
    ["file_hash"] => string(32) "4f39b7e3a0508e4569e97350d0201b08"
    ["product_id"] => string(1) "2"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(39) "/test/products/version/add?product_id=2"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  3. Chris D

    Chris D Xen Resources Developer Staff Member Xen Notices

    Ah, this may relate to an orphaned license you have in the database.

    Such as perhaps a license belonging to a user you have since deleted, or a user that has been merged and now has a different user_id or something like that.

    I'm going to add this code to handle it.


    Line 151 is:
    Change that to:
    if (!isset($users[$license['user_id']]))

    $user $users[$license['user_id']];
    PERuss and Bob B like this.
  4. PERuss

    PERuss Member Xen Notices

    Thanks Chris,

    Our of curiosity does the error message show which user id it relates too that I'm not seeing?

Share This Page