From d27086aca7ea312301ee7946a3200a9fe43442c5 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Fri, 6 Jul 2012 02:23:21 +0200 Subject: [PATCH] Only check the defaultable array if it is, in fact, an array. --- class.databaserecord.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class.databaserecord.php b/class.databaserecord.php index 527838f..7bfee77 100644 --- a/class.databaserecord.php +++ b/class.databaserecord.php @@ -174,7 +174,7 @@ abstract class CPHPDatabaseRecordClass extends CPHPBaseClass } catch (NotFoundException $e) { - if(in_array($variable_name, $defaultable)) + if(is_array($defaultable) && in_array($variable_name, $defaultable)) { // Set to default value }