#24687 [Ana]: Fatal error: Only variables or references can be returned by reference
From: derick@php.net Date: Thu, 17 Jul 2003 08:35:39 +0000 Subject: #24687 [Ana]: Fatal error: Only variables or references can be returned by reference References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-44181@lists.php.net to get a copy of this message
ID: 24687
Updated by: derick@php.net
Reported By: nologic at pchome dot com dot tw
Status: Analyzed
Bug Type: Zend Engine 2 problem
Operating System: windows2000sp4
PHP Version: 5CVS-2003-07-16 (dev)
Assigned To: zeev
New Comment:
If you do it like this it works:
class TextSanitizer
{
function &htmlSpecialChars($text) {
$foo = preg_replace("/&/i", '&', htmlspecialchars($text,
ENT_QUOTES));
return $foo;
}
}
So would it really be *that* hard to make it work?
Previous Comments:
------------------------------------------------------------------------
[2003-07-17 03:23:15] zeev@php.net
It never really worked (caused memory corruption).
Unlikely to be changed, since it doesn't make sense, but we'll see.
------------------------------------------------------------------------
[2003-07-17 03:11:29] derick@php.net
Actually this is not a bug, but just another BC break, but a pretty
huge one. I think it's too much of a problem not to address it.
------------------------------------------------------------------------
[2003-07-16 19:48:20] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
..
------------------------------------------------------------------------
[2003-07-16 19:00:30] nologic at pchome dot com dot tw
Description:
------------
apache_2.0.47-win32-x86-no_ssl
XOOPS203 ( http://www.xoops.org )
For install:
php5-win32-200307162230 => Fatal Error !
php4.3.2 => succeeded !
sorry...my English is poor.
Reproduce code:
---------------
class TextSanitizer
{
function &htmlSpecialChars($text)
{
line 96 -> return preg_replace("/&/i", '&',
htmlspecialchars($text,
ENT_QUOTES));
}
}
Expected result:
----------------
Fatal error: Only variables or references can be returned by reference
in D:\www\xoops2\html\install\class\textsanitizer.php on line 96
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24687&edit=1
Thread (19 messages)
- #24687 [Opn->Bgs]: Fatal error: Only variables or references can be returned by reference
- #24687 [Bgs->Opn]: Fatal error: Only variables or references can be returned by reference
- #24687 [Opn->Ana]: Fatal error: Only variables or references can be returned by reference
- #24687 [Ana]: Fatal error: Only variables or references can be returned by reference
- #24687 [Ana->Asn]: Fatal error: Only variables or references can be returned by reference
- #24687 [Asn->Ana]: Fatal error: Only variables or references can be returned by reference
- #24687 [Com]: Fatal error: Only variables or references can be returned by reference
- #24687 [Com]: Fatal error: Only variables or references can be returned by reference
- #24687 [Ana->Opn]: Fatal error: Only variables or references can be returned by reference
- #24687 [Opn->WFx]: Fatal error: Only variables or references can be returned by reference
- #24687 [Com]: Fatal error: Only variables or references can be returned by reference
- #24687 [Com]: Fatal error: Only variables or references can be returned by reference
- #24687 [WFx->Opn]: Fatal error: Only variables or references can be returned by reference
- #24687 [Com]: Fatal error: Only variables or references can be returned by reference
- #24687 [Com]: Fatal error: Only variables or references can be returned by reference
- #24687 [Com]: Fatal error: Only variables or references can be returned by reference
- #24687 [Opn->Asn]: Fatal error: Only variables or references can be returned by reference
- #24687 [Asn->Csd]: Fatal error: Only variables or references can be returned by reference
| « previous | php.bugs (#44181) | next » |
|---|