|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-05-01 05:48 UTC] judas dot iscariote at gmail dot com
Description:
------------
an incorrect exception is thrown by SplTempFileObject
Reproduce code:
---------------
php -r '$foo = new SplTempFileObject(1024);'
Expected result:
----------------
not sure, since it's not documented, but I think at least not with "Success" message..
Actual result:
--------------
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'SplTempFileObject::__construct(php://temp/maxmemory:1024): failed to open stream: ****Success*****' in Command line code:1
Stack trace:
#0 Command line code(1): SplTempFileObject->__construct(1024)
#1 {main}
thrown in Command line code on line 1
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 22:00:01 2025 UTC |
seems to be completely broken. :-( this : $foo = new SplTempFileObject(); produces in CLI : PHP Fatal error: Uncaught exception 'RuntimeException' with message 'SplTempFileObject::__construct(php://temp): failed to open stream: **Illegal seek**' in Command line code:1 Stack trace: #0 Command line code(1): SplTempFileObject->__construct() #1 {main} thrown in Command line code on line 1 and in the webserver ( apache) produces : Fatal error: Uncaught exception 'RuntimeException' with message 'SplTempFileObject::__construct(php://temp): failed to open stream: *******Not a directory*******' in /srv/www/htdocs/temp.php:3 Stack trace: #0 /srv/www/htdocs/temp.php(3): SplTempFileObject->__construct() #1 {main} thrown in /srv/www/htdocs/temp.php on line 3 I don't think php://temp (???) wrapper should be detected as a directory, nor I have produced code to generate an "Illegal seek" .. ;-)