From 1644ef185ecf1e9fca3eb6b16351ef46b19d110f Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 10 May 2014 16:58:07 -0700 Subject: [PATCH] Fix system agent toggling in MySQL strict mode Summary: `''` is not a valid integer. Test Plan: Used `bin/accountadmin` to turn bot flag on and off for a user. Reviewers: btrahan, Firehed Reviewed By: Firehed Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D9046 --- src/applications/people/editor/PhabricatorUserEditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/people/editor/PhabricatorUserEditor.php b/src/applications/people/editor/PhabricatorUserEditor.php index 85cb7eabea..fa889f1223 100644 --- a/src/applications/people/editor/PhabricatorUserEditor.php +++ b/src/applications/people/editor/PhabricatorUserEditor.php @@ -243,7 +243,7 @@ final class PhabricatorUserEditor extends PhabricatorEditor { $log->setOldValue($user->getIsSystemAgent()); $log->setNewValue($system_agent); - $user->setIsSystemAgent($system_agent); + $user->setIsSystemAgent((int)$system_agent); $user->save(); $log->save(); -- 2.51.2