Don't store empty array value of a setting as NULL.
authorMattias Michaux <mattias.michaux@gmail.com>
Thu, 13 Oct 2016 14:59:02 +0000 (16:59 +0200)
committerMattias Michaux <mattias.michaux@gmail.com>
Thu, 13 Oct 2016 14:59:02 +0000 (16:59 +0200)
CRM/Core/BAO/Setting.php

index e948b5dfc155c4f831af3aaddbf3300b47dfc9e3..4f46fd7ac73bd59eeffadaf95410622daf08bd9d 100644 (file)
@@ -430,8 +430,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
         );
       }
     }
-
-    if (CRM_Utils_System::isNull($value)) {
+    if (!is_array($value) && CRM_Utils_System::isNull($value)) {
       $dao->value = 'null';
     }
     else {