Changeset 88

Show
Ignore:
Timestamp:
02/08/07 21:50:09 (2 years ago)
Author:
mikey
Message:

bugfix: use null instead of undefined variable $instance when calling a static method
removed tabs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/XJConf/converters/StaticClassValueConverter.php

    r77 r88  
    33 * Class to convert a value to an object using the constructor of the object. 
    44 * 
    5  * @author  Stephan Schmidt <stephan.schmidt@schlund.de> 
     5 * @author      Stephan Schmidt <stephan.schmidt@schlund.de> 
     6 * @author      Frank Kleine <mikey@xjconf.net> 
     7 * @package     XJConf 
     8 * @subpackage  converters 
    69 */ 
    710XJConfLoader::load('converters.ValueConverter', 
     
    4346    { 
    4447        if (class_exists($this->className) == false) { 
    45                throw new ValueConversionException('Class "' . $this->className . '" does not exist.'); 
    46            } 
     48            throw new ValueConversionException('Class "' . $this->className . '" does not exist.'); 
     49        } 
    4750 
    4851        if ($def instanceof TagDefinition) { 
     
    112115                    throw new ValueConversionException('Could not add child "' . $child->getKey() . '" to "' . $this->getType() . '" using "' . $child->getSetterMethod() . '()" as the method is not static.'); 
    113116                } 
    114                 $method->invoke($instance, $child->getConvertedValue()); 
     117                $method->invoke(null, $child->getConvertedValue()); 
    115118            } catch (ReflectionException $re) { 
    116119                throw new ValueConversionException('Could not add child "' . $child->getKey() . '" to "' . $this->getType() . '" using "' . $child->getSetterMethod() . '()", exception message: "' . $re->getMessage() . '".');