Not a bug Error: Call to a member function getWidth() on null src/addons/XFMG/Service/Media/Watermarker.php:52

Gregory Lynn

Well-known member
Affected version
2.0.0
I keep getting an error like this over and over how doI fix it?

#0 src/addons/XFMG/InlineMod/Media/AddWatermark.php(34): XFMG\Service\Media\Watermarker->watermark()
#1 src/XF/InlineMod/AbstractAction.php(87): XFMG\InlineMod\Media\AddWatermark->applyToEntity(Object(XFMG\Entity\MediaItem), Array)
#2 src/XF/InlineMod/AbstractAction.php(80): XF\InlineMod\AbstractAction->applyInternal(Object(XF\Mvc\Entity\ArrayCollection), Array)
#3 src/XF/Pub/Controller/InlineMod.php(131): XF\InlineMod\AbstractAction->apply(Object(XF\Mvc\Entity\ArrayCollection), Array)
#4 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\InlineMod->actionPerform(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:InlineMod', 'Perform', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\InlineMod), Object(XF\Mvc\Reply\Reroute))
#6 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(1879): XF\Mvc\Dispatcher->run()
#8 src/XF.php(328): XF\App->run()
#9 index.php(13): XF::runApp('XF\\Pub\\App')
#10 {main}



Request state


array(4) {
["url"] => string(18) "/forum/inline-mod/"
["referrer"] => string(80) "https://www.themcnation.com/forum/media/albums/java-minecraft-storage-area-2.40/"
["_GET"] => array(0) {
}
["_POST"] => array(9) {
["ids"] => array(2) {
[0] => string(3) "642"
[1] => string(3) "643"
}
["type"] => string(10) "xfmg_media"
["action"] => string(13) "add_watermark"
["confirmed"] => string(1) "1"
["_xfRedirect"] => string(80) "https://www.themcnation.com/forum/media/albums/java-minecraft-storage-area-2.40/"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(53) "/forum/media/albums/java-minecraft-storage-area-2.40/"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
Are you sure you're getting this over and over?

This could really only happen under very specific circumstances.

This particular log has happened when a moderator has attempted to add a watermark to two images via inline moderation. It seems that while he was in that process, one of the images was deleted. That could suggest, for example, that while one moderator was about to watermark these images, another moderator or the user came along and just so happened to delete one of the images.

Are other similar errors definitely the same? Could you post some more?
 
Are you sure you're getting this over and over?

This could really only happen under very specific circumstances.

This particular log has happened when a moderator has attempted to add a watermark to two images via inline moderation. It seems that while he was in that process, one of the images was deleted. That could suggest, for example, that while one moderator was about to watermark these images, another moderator or the user came along and just so happened to delete one of the images.

Are other similar errors definitely the same? Could you post some more?
I found the problem, I had 2 images that were halfway uploaded and it was causing the error. And after I deleted them everything was fine. I was in the middle of updating the media thumbnails and it stopped because of a server error and I am guessing that is how I got 2 half images.
 
Back
Top Bottom