diff options
author | Andreas Gohr <andi@splitbrain.org> | 2007-06-24 19:49:03 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2007-06-24 19:49:03 +0200 |
commit | 038a0931f63c4ccf4b9f1de564cd3c6b6b43c58a (patch) | |
tree | d7cdfe9e76acbb090899be95de5007aad6797f0d | |
parent | f4ba5b8dcbf8dca35c3c8f4969efafc3763221df (diff) | |
download | rpg-038a0931f63c4ccf4b9f1de564cd3c6b6b43c58a.tar.gz rpg-038a0931f63c4ccf4b9f1de564cd3c6b6b43c58a.tar.bz2 |
workaround for PHP bug in config manager FS#1152
Workaround for PHP bug 41773:
http://bugs.php.net/bug.php?idA773
darcs-hash:20070624174903-7ad00-ae406540aca27e20f8fbd2f7c454c079975ebe22.gz
-rw-r--r-- | lib/plugins/config/settings/config.class.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 4d694de1f..1a116cb34 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -133,7 +133,11 @@ if (!class_exists('configuration')) { if ($this->_format == 'php') { - $contents = @php_strip_whitespace($file); + if(@file_exists($file)){ + $contents = @php_strip_whitespace($file); + }else{ + $contents = ''; + } $pattern = '/\$'.$this->_name.'\[[\'"]([^=]+)[\'"]\] ?= ?(.*?);(?=[^;]*(?:\$'.$this->_name.'|@include|$))/s'; $matches=array(); preg_match_all($pattern,$contents,$matches,PREG_SET_ORDER); |