Changeset 12001
- Timestamp:
- 10/06/08 21:50:16 (5 years ago)
- Files:
-
- branches/1.2/lib/helper/ObjectHelper.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.2/lib/helper/ObjectHelper.php
r11783 r12001 73 73 { 74 74 // text method exists? 75 if ($text_method && !method_exists($option, $text_method)) 75 $method_exists = ($text_method == '__toString') ? method_exists($option, $text_method) : is_callable(array($option, $text_method)); 76 if ($text_method && !$method_exists) 76 77 { 77 78 throw new sfViewException(sprintf('Method "%s" doesn\'t exist for object of class "%s".', $text_method, _get_class_decorated($option))); … … 79 80 80 81 // value method exists? 81 if (!method_exists($option, $value_method)) 82 $method_exists = ($value_method == '__toString') ? method_exists($option, $value_method) : is_callable(array($option, $value_method)); 83 if (!$method_exists) 82 84 { 83 85 throw new sfViewException(sprintf('Method "%s" doesn\'t exist for object of class "%s".', $value_method, _get_class_decorated($option))); … … 298 300 299 301 // method exists? 300 if (!method_exists($object, $method[0])) 302 $method_exists = ($method[0] == '__toString') ? method_exists($object, $method[0]) : is_callable(array($object, $method[0])); 303 if (!$method_exists) 301 304 { 302 305 throw new sfViewException(sprintf('Method "%s" doesn\'t exist for object of class "%s".', $method[0], _get_class_decorated($object))); … … 326 329 } 327 330 } 331