Re: cvs: phpdoc /en/reference/mysql/functions mysql-real-escape-string.xml
| From: | Aidan Lister | Date: | Tue, 19 May 2009 08:38:34 +0000 |
| Subject: | Re: cvs: phpdoc /en/reference/mysql/functions mysql-real-escape-string.xml | ||
| References: | 1 2 3 4 | Groups: | php.doc.cvs |
| Request: | Send a blank email to doc-cvs+get-4033@lists.php.net to get a copy of this message | ||
Hi Hannes,
I see what you mean - I'll go through the usernotes and the things we
discussed and update the page this week.
Regards,
Aidan
On Sun, May 17, 2009 at 3:02 PM, Hannes Magnusson
<hannes.magnusson@gmail.com> wrote:
> On Sat, May 16, 2009 at 19:10, Aidan Lister <aidan@php.net> wrote:
>> 4. The magic quotes check highlights an interesting problem but
>> doesn't discuss it. A cleaner and more reusable approach would be
>> pre-processing the whole POST array. That way huge amounts of code
>> won't need to be modified in PHP6 (when get_magic_quotes_gpc is gone).
>> Although it's not as much of a problem now, the whole issue should
>> probably be discussed on that page.
>
> That is the whole point of the example, to showcase how to escape
> _correctly_ taking all possible fuckedup configurations into account.
> The preceding connecting and stuff is just to have a standalone example.
> And get_magic_quotes_gpc() is not gone in PHP6, I fought hard to keep
> it there as it is the only way to write best practice code in PHP5 and
> still be PHP6 compatible.
>
>> Do you disagree, or are you highlighting the need for more informative
>> CVS messages? :)
>
> Well, your arguments are fine, and the example probably could be
> better, but the things you comment on are just fillers. The point is
> to use $link with mysql_real_escape_string(), check for MQ and cast
> the arguments correctly.
>
> -Hannes
>