note 89864 deleted from function.mysql-real-escape-string by aidan
| From: | aidan@php.net | Date: | Sun, 24 May 2009 19:41:18 +0000 |
| Subject: | note 89864 deleted from function.mysql-real-escape-string by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155928@lists.php.net to get a copy of this message | ||
Note Submitter: richardwo at live dot co dot uk
----
There could be a memory leak when using mysql_real_escape_string() when you pass a SimpleXML node
(which is an object) to this function.
To avoid this, typecast it first e.g.
<?php
$escapedVar = mysql_real_escape_string( (string) $xml->node->name);
?>
This may only be a problem if you are doing this thousands of times in a loop.