Author: chammers
Date: Tue Oct  6 19:57:41 2009
New Revision: 822463

URL: http://svn.apache.org/viewvc?rev=822463&view=rev
Log:
LOG4PHP-81
Why was that missing from the previous commit?!

Modified:
    incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php

Modified: incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php
URL: 
http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php?rev=822463&r1=822462&r2=822463&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php 
(original)
+++ incubator/log4php/trunk/src/main/php/helpers/LoggerOptionConverter.php Tue 
Oct  6 19:57:41 2009
@@ -93,6 +93,13 @@
                }
                
                trigger_error("Could not convert ".var_export($value,1)." to 
boolean!", E_USER_WARNING);
+               } elseif (is_bool($value)) {
+                   return $value;
+               } elseif (is_int($value)) {
+                   return !($value == 0); // true is everything but 0 like in 
C 
+               }
+               
+               trigger_error("Could not convert ".var_export($value,1)." to 
boolean!", E_USER_WARNING);
                return $default;
        }
 
@@ -236,7 +243,6 @@
                // if(!empty($value)) {
                        return LoggerOptionConverter::substVars($value, $props);
                // }
-               }
 
        /**
         * Perform variable substitution in string <var>$val</var> from the


Reply via email to