Permalink
Browse files

prevent E_NOTICE when config singleton does not exist yet

  • Loading branch information...
1 parent cb264b8 commit ea7918726ce7dea749a57a8744f0eeaf7fd4375d @cweiske cweiske committed Mar 15, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 PEAR/Config.php
View
@@ -706,7 +706,9 @@ function getDefaultConfigFiles()
*/
function &singleton($user_file = '', $system_file = '', $strict = true)
{
- if (is_object($GLOBALS['_PEAR_Config_instance'])) {
+ if (isset($GLOBALS['_PEAR_Config_instance'])
+ && is_object($GLOBALS['_PEAR_Config_instance'])
+ ) {
return $GLOBALS['_PEAR_Config_instance'];
}

0 comments on commit ea79187

Please sign in to comment.