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.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to