note 99044 added to simplexmlelement.addAttribute
| From: | mdy at onpick dot com | Date: | Sat, 24 Jul 2010 05:07:01 +0000 |
| Subject: | note 99044 added to simplexmlelement.addAttribute | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171085@lists.php.net to get a copy of this message | ||
re 'addAttribute method checks the length of the fields to determine whether or not they are
empty. In otherwords if you are trying to addAttribute("patent_holder", "")
this will fail as the strlen is 0.'
yes it does fail but it's a bug - it it should not fail because an attribute followed by an
equal sign and empty quotes is valid xml:
<new_patent patent_holder=""/>
----
Server IP: 69.147.83.197
Probable Submitter: 64.234.46.243
----
Manual Page -- http://www.php.net/manual/en/simplexmlelement.addAttribute.php
Edit -- https://master.php.net/note/edit/99044
Del: integrated -- https://master.php.net/note/delete/99044/integrated
Del: useless -- https://master.php.net/note/delete/99044/useless
Del: bad code -- https://master.php.net/note/delete/99044/bad+code
Del: spam -- https://master.php.net/note/delete/99044/spam
Del: non-english -- https://master.php.net/note/delete/99044/non-english
Del: in docs -- https://master.php.net/note/delete/99044/in+docs
Del: other reasons-- https://master.php.net/note/delete/99044
Reject -- https://master.php.net/note/reject/99044
Search -- https://master.php.net/manage/user-notes.php