]> granicus.if.org Git - php/commit
Prevent SimpleXML from silently modifying types of variables that are
authorZeev Suraski <zeev@php.net>
Wed, 11 Feb 2004 19:15:30 +0000 (19:15 +0000)
committerZeev Suraski <zeev@php.net>
Wed, 11 Feb 2004 19:15:30 +0000 (19:15 +0000)
commitc8c0e979826b677de5f786920289056242ea5c54
tree987e3ba3b0bb6931fd701f551916fc25abda3b8c
parentd91fc5fa3c9e34a5e4b853b3fa9f2a0b2c8f1a06
Prevent SimpleXML from silently modifying types of variables that are
assigned to its objects.

Implementation notes for overloaded object modules:

- If you return a zval which is not otherwise referenced by the extension
  or the engine's symbol table, its reference count should be 0.
- If you receive a value zval in write_property/write_dimension, you
  may only modify it if its reference count is 1.  Otherwise, you must
  create a copy of that zval before making any changes.  You should NOT
  modify the reference count of the value passed to you.

Have fun!
ext/simplexml/simplexml.c