summaryrefslogtreecommitdiff
path: root/program/lib/MDB2
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-09-19 06:43:57 +0000
committeralecpl <alec@alec.pl>2011-09-19 06:43:57 +0000
commitb578abb9f94fa1d7dc8ce2ee94e35fa074d51ce4 (patch)
tree7394a6739c0ad1fa2ed1de60b17c20133072c3f6 /program/lib/MDB2
parent85993b24f8860d7674414fce18acaa8bcef359a5 (diff)
- Applied fixes from trunk up to r5232
Diffstat (limited to 'program/lib/MDB2')
-rw-r--r--program/lib/MDB2/Driver/Datatype/Common.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/lib/MDB2/Driver/Datatype/Common.php b/program/lib/MDB2/Driver/Datatype/Common.php
index 2a815cbef..2083d7577 100644
--- a/program/lib/MDB2/Driver/Datatype/Common.php
+++ b/program/lib/MDB2/Driver/Datatype/Common.php
@@ -1379,7 +1379,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
if (PEAR::isError($db)) {
return $db;
}
- if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
+ if (isset($db->function) && is_object($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
return $db->function->now('date');
}
return 'CURRENT_DATE';
@@ -1408,7 +1408,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
if (PEAR::isError($db)) {
return $db;
}
- if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
+ if (isset($db->function) && is_object($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
return $db->function->now('timestamp');
}
return 'CURRENT_TIMESTAMP';
@@ -1437,7 +1437,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
if (PEAR::isError($db)) {
return $db;
}
- if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
+ if (isset($db->function) && is_object($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
return $db->function->now('time');
}
return 'CURRENT_TIME';