From 673b98046cc6eccfb470e5f1db91a6dabac4aba6 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 13 Apr 2016 16:03:37 -0700 Subject: [PATCH] Fix for odd PHP behavior on $fieldType == '_NULL_'. --- e107_handlers/mysql_class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index 80026a7bd..7dd648179 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -1222,7 +1222,8 @@ class e_db_mysql private function _getPDOValue($type, $fieldValue) { - if($fieldValue == '_NULL_') + + if(is_string($fieldValue) && ($fieldValue == '_NULL_')) { $type = 'null'; } @@ -2801,6 +2802,7 @@ class e_db_mysql $mes->addDebug("Error writing file: ".e_CACHE_DB.$tableName.'.php'); //Fix for during v1.x -> 2.x upgrade. // echo "Error writing file: ".e_CACHE_DB.$tableName.'.php'.'
'; } + } } }