[geeklog-cvs] Geeklog-1.x/system/classes config.class.php, 1.46, 1.47
Dirk Haun
dhaun at qs1489.pair.com
Sun Aug 3 15:35:47 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/system/classes
In directory qs1489.pair.com:/tmp/cvs-serv35400/system/classes
Modified Files:
config.class.php
Log Message:
Catch and log problems unserializing config entries (related to bug #0000690)
Index: config.class.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/classes/config.class.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** config.class.php 7 Jul 2008 10:10:01 -0000 1.46
--- config.class.php 3 Aug 2008 19:35:44 -0000 1.47
***************
*** 109,112 ****
--- 109,114 ----
global $_TABLES;
+ $false_str = serialize(false);
+
$sql = "SELECT name, value, group_name FROM {$_TABLES['conf_values']} WHERE (type <> 'subgroup') AND (type <> 'fieldset')";
$result = DB_query($sql);
***************
*** 115,119 ****
if (!array_key_exists($row[2], $this->config_array) ||
!array_key_exists($row[0], $this->config_array[$row[2]])) {
! $this->config_array[$row[2]][$row[0]] = unserialize($row[1]);
}
}
--- 117,126 ----
if (!array_key_exists($row[2], $this->config_array) ||
!array_key_exists($row[0], $this->config_array[$row[2]])) {
! $value = @unserialize($row[1]);
! if (($value === false) && ($row[1] != $false_str)) {
! COM_errorLog("Unable to unserialize {$row[1]} for {$row[2]}:{$row[0]}");
! } else {
! $this->config_array[$row[2]][$row[0]] = $value;
! }
}
}
More information about the geeklog-cvs
mailing list