#23390 [NEW]: similar_text() requires reference but generates warning

From: Date: Mon, 28 Apr 2003 22:02:14 +0000
Subject: #23390 [NEW]: similar_text() requires reference but generates warning
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38656@lists.php.net to get a copy of this message
From:             phpbugs at localpin dot com
Operating system: Windows XP Home Edition
PHP version:      4.3.1
PHP Bug Type:     PHP options/info functions
Bug description:  similar_text() requires reference but generates warning

(I think this is supposed to be fixed 'in CVS' whatever that means, but
just in case...)

similar_text() requires a parameter by reference but generates a warning
for doing so!  My log file is thus packed with warnings as follows, and I
must switch off the php.ini setting which warns about such things.

[Mon Apr 28 23:37:25 2003] [error] PHP Warning:  Call-time
pass-by-reference has been deprecated - argument passed by value;  If you
would like to pass it by reference, modify the declaration of
similar_text(). If you would like to enable call-time pass-by-reference,
you can set allow_call_time_pass_reference to true in your INI file. 
However, future versions may not support this any longer.  

I am told to "modify the declaration of similar_text()", a PHP function!

I would suggest that if PHP is deprecating pass-by-reference:
- this function be changed ASAP
- this function (and any others) that are part of PHP and use reference
variables do not issue a warning
- at the very least, a note in the documentation for similar_text() about
this.

It is my aim (and the general aim of good programming I suppose) to log
and fix ALL errors, but this one makes this aim impossible unless I switch
this error off completely!

Thanks!
-- 
Edit bug report at http://bugs.php.net/?id=23390&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23390&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23390&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23390&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23390&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23390&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23390&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23390&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23390&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23390&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23390&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23390&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23390&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23390&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23390&r=gnused



Thread (2 messages)

« previous php.bugs (#38656) next »