MySQL Forums
Forum List  »  PHP

Re: single quote in data breaks file load
Posted by: Steve Szmidt
Date: July 27, 2005 08:19AM

Roland Bouman wrote:
> while ( ( $data = fgetcsv($Handle, 384) ) !==
> FALSE) {
> array_walk(&$data, 'my_mysql_real_escape_string');
> list(...) = $data;
> ...
> }

Bummer, I get this message when executing it:
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 array_walk(). If you would like toenable 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. in /var/lib/mysql/Import-cdrcleanup.php on line 53

Line 53 is array_walk(&$data, 'my_mysql_real_escape_string');

I'd prefer not to use a depreciated function for obvious reasons. Any other way to do this?

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.