cvs: pear /Image_Tools/Image Tools.php
| From: | Firman Wandayandi | Date: | Mon, 30 Oct 2006 08:11:48 +0000 |
| Subject: | cvs: pear /Image_Tools/Image Tools.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42886@lists.php.net to get a copy of this message | ||
firman Mon Oct 30 08:11:48 2006 UTC
Modified files:
/pear/Image_Tools/Image Tools.php
Log:
fix method Image_Tools::factory() bug, failure to call in the class's body since wrong static
call detection condition
http://cvs.php.net/viewvc.cgi/pear/Image_Tools/Image/Tools.php?r1=1.5&r2=1.6&diff_format=u
Index: pear/Image_Tools/Image/Tools.php
diff -u pear/Image_Tools/Image/Tools.php:1.5 pear/Image_Tools/Image/Tools.php:1.6
--- pear/Image_Tools/Image/Tools.php:1.5 Tue Oct 3 14:17:50 2006
+++ pear/Image_Tools/Image/Tools.php Mon Oct 30 08:11:48 2006
@@ -29,7 +29,7 @@
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
* The PHP License, version 3.0
- * @version CVS: $Id: Tools.php,v 1.5 2006/10/03 14:17:50 firman Exp $
+ * @version CVS: $Id: Tools.php,v 1.6 2006/10/30 08:11:48 firman Exp $
*/
// }}}
@@ -311,7 +311,7 @@
*/
function &factory($tool, $options = array())
{
- if (isset($this)) {
+ if (isset($this) && strtolower(get_class($this)) == 'image_tools') {
return PEAR::raiseError('This method may only be called statically',
IMAGE_TOOLS_BASE_ERR_NONSTATIC_FAILED);
}