MySQL error when unsubscribing from watch emails

DragonByte Tech

Well-known member
Affected version
2.2.5
While assisting on another website, I came across this MySQL error
Code:
XF\Db\Exception: MySQL query error [1366]: Incorrect integer value: '' for column 'email_subscribe' at row 1 src/XF/Db/AbstractStatement.php:230

I believe the offending code is this bit in src/addons/XFRM/EmailStop/ResourceItem.php:41
PHP:
$resourceWatchRepo->setWatchState($resource, $user, 'update', ['email_subscribe' => false]);

Should be ['email_subscribe' => 0] in order to not trigger the error.
 
Top Bottom