From f433158bedee99dd52c47c35e8e19e601027da11 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Wed, 29 Aug 2012 04:19:15 -0400 Subject: [PATCH] config: fix get_config and get_pconfig search for serialized array works also if the serialized string contains newlines --- include/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/config.php b/include/config.php index 1f2a70e5a1..44606e329a 100644 --- a/include/config.php +++ b/include/config.php @@ -68,7 +68,7 @@ function get_config($family, $key, $instore = false) { ); if(count($ret)) { // manage array value - $val = (preg_match("|^a:[0-9]+:{.*}$|", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']); + $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']); $a->config[$family][$key] = $val; return $val; } @@ -162,7 +162,7 @@ function get_pconfig($uid,$family, $key, $instore = false) { ); if(count($ret)) { - $val = (preg_match("|^a:[0-9]+:{.*}$|", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']); + $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']); $a->config[$uid][$family][$key] = $val; return $val; }