Jump to content
  • [Beta8] TypeError exception when adding first comment to a gallery image...


    Hello,

    I believe this bug report to be valid 😉 We have a complex application that plays around with gallery images but I disabled it (in the ACP) before doing this test...

    • Starting with an existing album
    • Deleted all images
    • Added first image
    • Added comment to first image (comment was "Add a simple comment with no images…")
    • Click "Submit Comment"
    • Nothing appears to happen - comment edit box remains open.
    • But... the ACP logs show the following error:

    TypeError: IPS\gallery\Category::setLastImage(): Argument #1 ($image) must be of type ?IPS\gallery\Image, IPS\gallery\Album\Item given, called in /home/bn2468/public_html/applications/gallery/sources/Category/Category.php on line 627 (0)
    #0 /home/bn2468/public_html/applications/gallery/sources/Category/Category.php(627): IPS\gallery\Category->setLastImage(Object(IPS\gallery\Album\Item))
    #1 /home/bn2468/public_html/system/Node/Model.php(1197): IPS\gallery\Category->_setLastComment(Object(IPS\gallery\Album\Comment), Object(IPS\gallery\Album\Item))
    #2 /home/bn2468/public_html/system/Content/Comment.php(490): IPS\Node\Model->setLastComment(Object(IPS\gallery\Album\Comment), Object(IPS\gallery\Album\Item))
    #3 /home/bn2468/public_html/applications/gallery/sources/Album/Comment.php(151): IPS\Content\Comment->postCreate()
    #4 /home/bn2468/public_html/system/Content/Comment.php(336): IPS\gallery\Album\Comment->postCreate()
    #5 /home/bn2468/public_html/system/Content/Item.php(4943): IPS\Content\Comment::create(Object(IPS\gallery\Album\Item), '<p>Add a simple...', false, NULL, NULL, Object(IPS\Member), NULL, NULL, NULL, NULL)
    #6 /home/bn2468/public_html/system/Content/Item.php(4560): IPS\Content\Item->processCommentForm(Array)
    #7 /home/bn2468/public_html/system/Theme/Theme.php(3706) : eval()'d code(169): IPS\Content\Item->commentForm()
    #8 /home/bn2468/public_html/system/Theme/Dev/Template.php(151): IPS\Theme\theme_gallery_front_browse_albumComments(Object(IPS\gallery\Album\Item))
    #9 /home/bn2468/public_html/applications/gallery/sources/Album/Item.php(598): IPS\Theme\Dev\Template->__call('albumComments', Array)
    #10 /home/bn2468/public_html/applications/gallery/modules/front/gallery/browse.php(453): IPS\gallery\Album\Item->commentReviews('comments')
    #11 /home/bn2468/public_html/applications/gallery/modules/front/gallery/browse.php(178): IPS\gallery\modules\front\gallery\browse->_album(Object(IPS\gallery\Album))
    #12 /home/bn2468/public_html/system/Dispatcher/Controller.php(139): IPS\gallery\modules\front\gallery\browse->manage()
    #13 /home/bn2468/public_html/system/Content/Controller.php(124): IPS\Dispatcher\Controller->execute()
    #14 /home/bn2468/public_html/applications/gallery/modules/front/gallery/browse.php(81): IPS\Content\Controller->execute()
    #15 /home/bn2468/public_html/system/Dispatcher/Dispatcher.php(169): IPS\gallery\modules\front\gallery\browse->execute()
    #16 /home/bn2468/public_html/index.php(16): IPS\Dispatcher->run()
    #17 {main}

    Thanks,

    John


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...