ID:               45331
 Comment by:       j dot jeising at gmail dot com
 Reported By:      j dot jeising at gmail dot com
 Status:           Feedback
 Bug Type:         Class/Object related
 Operating System: Mac OS X 10.5.3
 PHP Version:      5.2.6
 New Comment:

Testcase:

--TEST--
Bug #45331 (Imagick::clone with trailing space results in ParserError)
--FILE--
<?php
$imagick = new Imagick ( 'image.jpg' );
$clone = $imagick -> clone ( );
var_dump ( $clone );
?>
--EXPECT--
object(Imagick)#2 (0) { }


Previous Comments:
------------------------------------------------------------------------

[2008-06-23 00:38:45] j dot jeising at gmail dot com

Download file here: http://jannes.webkassel.de/test.php.zip

------------------------------------------------------------------------

[2008-06-23 00:33:14] [EMAIL PROTECTED]

Weird, it works here on windows and linux.

Can you zip your src and post a link to it here please? Maybe there is
a hidden character (not a space)?

------------------------------------------------------------------------

[2008-06-23 00:30:29] j dot jeising at gmail dot com

Tested with latest snapshot on windows

php test.php
Parse error: syntax error, unexpected T_CLONE, expecting T_STRING or
T_VARIABLE
or '{' or '$' in test.php on line 4

Same probleme here.

------------------------------------------------------------------------

[2008-06-23 00:28:13] [EMAIL PROTECTED]

Yes, I misread the initial report. My 2nd comment asked you to test
with a snapshot.

------------------------------------------------------------------------

[2008-06-23 00:14:37] j dot jeising at gmail dot com

Pajoye, I think that's not a problem of imagick, more a parser problem.
You can't reproduce the problem because foo() is not clone(). "clone" is
a reserved keyword (http://docs.php.net/clone), imagick can use this
function because it's in the class namespace
(http://docs.php.net/manual/en/function.imagick-clone.php). PHP supports
this if the parser detects "->" before the keyword. But the parser does
not recognize the space in this case.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/45331

-- 
Edit this bug report at http://bugs.php.net/?id=45331&edit=1

Reply via email to