Re: ref fix revisited

From: Date: Wed, 14 Sep 2005 13:27:33 +0000
Subject: Re: ref fix revisited
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-18889@lists.php.net to get a copy of this message
Am 14.09.2005 um 15:10 schrieb Derick Rethans:
Of course it does, you have a ) too much. Besides this, the following
I should drink more coffee...
script does not make a fatal error: <?php $name = "derick"; array_pop(explode('.', $name)); ?>
Fatal error: Only variables can be passed by reference in /home/www/core/media.class.php on line 221 Line 221 is this one: $filename = sprintf('%s.%s', md5(uniqid(rand(), true)), array_pop(explode('.', $name))); This replacement fixes the error: $_explode_tmp_result = explode('.', $name); $filename = sprintf('%s.%s', md5(uniqid(rand(), true)), array_pop($_explode_tmp_result)); A.

« previous php.internals (#18889) next »