Commit Graph

402 Commits

Author SHA1 Message Date
Marcus Boerger
b1154bd4f7 - Add new test 2006-05-23 21:56:36 +00:00
Marcus Boerger
ccd2bc0005 - Fix SEGV in case class to generate is not derived from SimpleXMLElement
by issueing an error
2006-05-23 21:37:17 +00:00
Marcus Boerger
2a36ccbaa6 - Proto fix/add 2006-05-17 00:07:05 +00:00
Marcus Boerger
c3b47f5aa4 - Fix properties access to children() result
- Allow access by namespace prefix
2006-04-14 15:15:21 +00:00
Marcus Boerger
d1b5f0deaa - Do not provide ns info in first sxe creation 2006-04-14 14:11:54 +00:00
Marcus Boerger
311a7af62d - Allow access to namespaced root by specifying prefix on creation
- Fix access to non namespaced root
2006-04-14 14:07:51 +00:00
Marcus Boerger
4e44e0b147 - If node no longer exists then there won't be any data 2006-04-14 12:18:15 +00:00
Marcus Boerger
c4b1606466 - Coverity issue 59 2006-04-10 23:19:23 +00:00
Antony Dovgal
6a53a49c8b MF51: fix bug #36898 (__set() leaks in classes extending internal ones)
Added:
ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
2006-03-29 15:08:52 +00:00
Dmitry Stogov
daca456e1a Fixed test 2006-03-27 13:53:19 +00:00
Antony Dovgal
d4cdad2c2e add new tests 2006-03-24 12:08:19 +00:00
Dmitry Stogov
7c0e534157 Dropped zend.ze1_compatibility_mode 2006-03-16 10:33:23 +00:00
Rob Richards
032edbfb92 implement addChild() and addAttribute() methods
add test
2006-03-06 20:16:03 +00:00
Antony Dovgal
7df141811e add test 2006-03-05 16:12:54 +00:00
Antony Dovgal
def2ab1ac1 MF51: fix #36611 (assignment to SimpleXML object attribute changes argument type to string) 2006-03-05 15:58:09 +00:00
Rob Richards
6c2c57e2bd fix crash passing non-string member to sxe_prop_dim_exists
allow offsets to be used when calling isset/unset
fix tests
add test
2006-03-05 14:01:13 +00:00
Dmitry Stogov
c366cc6d1a Nuke int32_t (everywhere except streams layer) and signed/unsigned warnings 2006-03-02 13:12:45 +00:00
Rob Richards
96cb8329e5 nuke tests for libxml2 version - will always be > 2.6.0 2006-03-01 15:36:34 +00:00
Marcus Boerger
10a5901abf - Fix count/foreach interaction 2006-02-27 13:32:25 +00:00
Marcus Boerger
d8b7f1dea0 - MFB 2006-02-27 11:55:23 +00:00
Marcus Boerger
3dd6bb16aa - Fix test 2006-02-26 16:40:01 +00:00
Marcus Boerger
30806dbc2b - Missing conversion 2006-02-26 16:12:21 +00:00
Marcus Boerger
1dd351d649 - Use get_property_ptr_ptr handler to prevent SEGV as in bug #35785
# Issue not completley solved though
2006-02-26 15:48:28 +00:00
Marcus Boerger
24d83ebd0f - Add another write case 2006-02-26 13:37:54 +00:00
Marcus Boerger
ebef7961a3 - Unicode support 2006-02-26 12:00:39 +00:00
Marcus Boerger
d1f3c48041 - Added ability to add elements by index if such elements already exist
- Added SimpleXMLElement::getName() to access the node name
# This allows to retrieve the name of the root element which is otherwise
# only available by converting the sxe object into a dom object.
2006-02-25 23:41:06 +00:00
Marcus Boerger
b13105ee4c - Add ability to add new nodes via properties 2006-02-24 15:49:13 +00:00
Dmitry Stogov
0f1209ab3d Portable unicode string API:
- use the same type (int) for zval.value.usr.len and zval.value.str.len
  - use union "zstr" as char*/UChar* mixture instead of void*
  - Z_UNISTR() and Z_UNILEN() no longer check for Z_TYPE()
  - nuke int32_t from ZE (not finisned)
2006-02-21 20:12:43 +00:00
Dmitry Stogov
09ca61c125 Made server wide switch for unicode on/off (according to PDM). 2006-02-13 10:23:59 +00:00
Antony Dovgal
d163171c17 MF51: initialize variables 2006-02-06 10:54:49 +00:00
Marcus Boerger
c67d8b2152 - Iterator API was changed 2006-02-05 23:31:47 +00:00
Dmitry Stogov
227295a4f1 Unicode stuff is changed according to decision maden on PDM.
Now IS_BINRAY data type is removed and IS_STRING starts behave as IS_BINARY in unicode mode. IS_STRING is incompatible with IS_UNICODE, so ALL functions should be improved to support unicode mode.
2006-01-17 12:18:53 +00:00
foobar
251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
Marcus Boerger
1edb0395ab - Fixed Bug #35785 (SimpleXML memory read error) 2005-12-23 20:31:39 +00:00
Marcus Boerger
69ae0635f4 - Add new test 2005-12-23 20:26:22 +00:00
Antony Dovgal
632e571642 MFB: add missing skipif conditions, fix existing ones
add one missing test
2005-12-21 11:43:24 +00:00
Dmitry Stogov
8010c59c88 Unicode support 2005-12-07 16:52:13 +00:00
foobar
a208d9a966 - Nuke php3 legacy 2005-12-06 02:28:26 +00:00
Marcus Boerger
a71b5970d5 - Fix tests 2005-11-30 08:14:49 +00:00
Marcus Boerger
d237f996f9 - Fix some memleaks 2005-11-29 02:46:19 +00:00
Marcus Boerger
2bb59717c7 - Allow test to be used w/o run-tests.php 2005-11-29 02:41:54 +00:00
Marcus Boerger
ba03c4fcc3 - Synch test name 2005-11-24 20:27:27 +00:00
Marcus Boerger
29e64a2fc8 - Extend SimpleXmlElement::__construct() with two parameters
. int options: pass options to 2.6.0+ parsing functions
  . bool data_is_url: whether first parameter is a url rather then xml data
- Fix parameter parsing
2005-11-20 13:03:15 +00:00
Rasmus Lerdorf
65bb007a3e MFB - This isn't a DOM thing anymore, just libxml 2005-11-05 22:41:09 +00:00
Rob Richards
8de7ff8c91 optimize sxe_add_registered_namespaces
add only first encountered prefixes to namespace arrays
update test
2005-11-01 23:21:29 +00:00
Marcus Boerger
78456eb9a2 - Test no namespace case, too 2005-11-01 11:55:13 +00:00
Marcus Boerger
9956744821 - Handle default namespaces
# Another time it shows xml is far from being simple
2005-11-01 11:53:14 +00:00
Marcus Boerger
6b4a4afe8c - Implement count interface 2005-10-31 20:06:28 +00:00
Rob Richards
9c982bb62c check node type before accessing ns - prevent corruption under compact mode 2005-10-31 19:51:40 +00:00
Marcus Boerger
1b7db10076 - We don't need those 2005-10-31 19:47:00 +00:00
Marcus Boerger
2aadbbfca6 - Add functions to check for registered/in use namespaces 2005-10-31 19:09:13 +00:00
Marcus Boerger
a415bcc5d9 - Bugfix #35028 XML object fails FALSE test 2005-10-30 20:37:22 +00:00
Marcus Boerger
82aa412cf8 - Fix unicode expectations 2005-10-30 14:00:45 +00:00
Marcus Boerger
e1ce1262ce - Add new test 2005-10-30 13:01:01 +00:00
Marcus Boerger
b4ad6bbc82 - Protect against some edge case that is currently imossible, but will be 2005-10-30 00:38:39 +00:00
Marcus Boerger
378d5b764f - Simplify & speedup, once more 2005-10-30 00:35:55 +00:00
Marcus Boerger
b5c08eab91 - Simplify & speedup 2005-10-30 00:20:35 +00:00
Marcus Boerger
29be6e9b51 - Fix attribute handling when using xpath expressions that lead to attributes 2005-10-29 21:16:17 +00:00
Marcus Boerger
b4762f13f1 - Change var_dump to include all that is reachable, incl. @attributes
- Adapt tests and add new one
2005-10-29 16:12:57 +00:00
Marcus Boerger
f7459bad30 - Fix issue with entities in attributes 2005-10-23 23:41:20 +00:00
Marcus Boerger
d78da85370 - Add new test 2005-10-23 23:25:46 +00:00
Dmitry Stogov
362f3fd7ea Fixed compilation error 2005-10-06 06:27:27 +00:00
Marcus Boerger
6ccd7ef74d - Update cast_object handlers 2005-10-05 19:12:44 +00:00
Marcus Boerger
a0674235e3 - Really allow SXE being shared by not using anything from it directly in SPL 2005-10-03 16:04:50 +00:00
Marcus Boerger
bfaf987363 - MFB spl/simplexml integration (when sxe is shared) 2005-10-01 15:55:27 +00:00
Dmitry Stogov
9fc1de0181 Fixed test file 2005-09-19 06:11:12 +00:00
Derick Rethans
0f391bb0b3 - Add E_RECOVERABLE.
#- Thought I did this before already actually...
2005-09-15 16:19:48 +00:00
Rob Richards
af7f90f6c7 make sxe_properties_get respect namespace scope 2005-08-31 17:00:22 +00:00
Dmitry Stogov
f4b8f4e958 Unicode support cleanup 2005-08-23 09:33:46 +00:00
foobar
03cec74a0d Nuked EOLs from error messages 2005-08-18 13:34:04 +00:00
Dmitry Stogov
3509630024 trim() should accept objects with __toString() method 2005-08-17 11:36:32 +00:00
Dmitry Stogov
d0944d74f4 Unicode support 2005-08-16 15:09:51 +00:00
Rolland Santimano
bc87019a80 Updated calls to php_trim() to provide arg for returned string type 2005-08-16 06:04:59 +00:00
Dmitry Stogov
08fe0d1da3 Test engine is improved to support unicode mode 2005-08-15 14:37:55 +00:00
Sebastian Bergmann
52b001cc05 ZTS fixes. 2005-08-12 14:08:28 +00:00
Dmitry Stogov
21c1109e0c Unicode support 2005-08-12 11:29:33 +00:00
Andrei Zmievski
264cec8be6 Unicode support. 2005-08-11 23:36:07 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Rasmus Lerdorf
3064cb787d Missing closing folding marker 2005-07-07 03:53:47 +00:00
foobar
340bcffdf0 - Unify (+ spl can't be build shared so COMPILE_DL_SPL 2005-06-30 11:15:00 +00:00
foobar
78a5b7693c Use the new dependency system 2005-06-17 11:35:22 +00:00
foobar
39bcbfc306 - Made the libxml related stuff to error out if someone does --disable-all
or --disable-libxml. Better than silently just leave the ext out..
2005-04-27 13:12:55 +00:00
Marcus Boerger
8de753f09e - Add tests 2005-02-27 23:15:52 +00:00
Rob Richards
cb72e23c14 add optional parameter to pass libxml document load options 2004-12-05 12:02:35 +00:00
Rob Richards
a50166004d remove cloning under ze1_compatibility_mode
- minor BC break but doesnt work right under compat mode anyways
2004-08-30 17:29:22 +00:00
Sara Golemon
b48af415cd ZTS Fix 2004-08-06 16:36:00 +00:00
Ilia Alshanetsky
ee656c4b32 php_error() -> php_error_docref() 2004-08-05 23:57:51 +00:00
Antony Dovgal
58f9ed3a8e nuke unused variable 2004-08-04 14:57:40 +00:00
Zeev Suraski
84e6f8f075 Fix prototypes 2004-08-04 14:41:56 +00:00
Christian Stocker
0936bfa42c renamed registerNamespace() to registerXPathNamespace() 2004-07-25 14:59:21 +00:00
Christian Stocker
0b244def73 added new method SimpleXMLElement->registerNamespace(string prefix, string uri)
"registers a prefix <-> namespaceURI combination for use in a later xpath query. "
2004-07-25 11:02:43 +00:00
Wez Furlong
ed682e570a Implement extension load-order deps. 2004-07-18 12:03:51 +00:00
Wez Furlong
263723ec9b Update for count_elements handler for overloaded objects. 2004-05-04 15:03:48 +00:00
Marcus Boerger
b6321d4e8a Fix class names 2004-03-29 19:58:01 +00:00
Marcus Boerger
f8ff2ccf20 Fix writing of SQLite and SimpleXMl extension and add Rob to the credits
line of the latter. Add ext/SPL.
2004-03-28 20:27:18 +00:00
George Schlossnagle
8b2a760004 added test for property_exists checks. 2004-03-24 15:20:32 +00:00
George Schlossnagle
b9c04fe19a fixed non-existent elements check
ref: http://news.php.net/article.php?group=php.internals&article=8660
2004-03-24 05:04:26 +00:00
Stanislav Malyshev
5b0f6b1f34 Update for new read_property API 2004-03-21 18:28:38 +00:00
Derick Rethans
f66c62cef8 - Fixed compilation on the 'broken' IRIX native compiler. 2004-03-16 21:39:43 +00:00
Marcus Boerger
decc3fc6e6 Add new test 2004-03-14 15:33:15 +00:00
Marcus Boerger
6b0f57ee50 Rename hasMore() to valid() as discussed. (Part II) 2004-03-08 18:05:41 +00:00
Rob Richards
76ee5707f7 Fix bug #27436 dom_import_simplexml innaccurate
extensions register callbacks to export nodes
prevents segfault passing invalid objects to import functions
2004-03-01 12:09:24 +00:00
Rob Richards
16136dfe93 Fix bug #27237: Working with simplexml crashes apache2
object dtor must be used to cleanup iterator data correctly
Fix asXML() outputing incorrect node
2004-02-13 15:05:18 +00:00
Frank M. Kromann
cf2c4b26bb Adding mising declaration (needed for Win32 compilation) 2004-02-13 00:02:19 +00:00
Derick Rethans
cd4a39edf9 - Fixed start-up problem if both SPL and SimpleXML were enabled. The
double initialization of apache 1.3 was causing problems here.
2004-02-12 23:39:46 +00:00
Zeev Suraski
30171a7590 zend_default_classes.h -> zend_exceptions.h 2004-02-12 10:43:27 +00:00
Zeev Suraski
c8c0e97982 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!
2004-02-11 19:15:30 +00:00
Rob Richards
5731108c55 Fix test 2004-02-11 13:00:19 +00:00
Rob Richards
6e4a4e8a9a Fix compiler warnings
Update tests
2004-02-11 12:19:26 +00:00
Zeev Suraski
e8e9b2afee Implement get callback for SimpleXML (it now supports pre/post increment
as well as binary-assign-ops)
2004-02-10 09:30:38 +00:00
Zeev Suraski
2a9e1294bc Update to new API 2004-02-08 17:25:54 +00:00
Zeev Suraski
8424be849f - Update with new destructor code 2004-02-04 11:14:47 +00:00
Marcus Boerger
dfad2955ee Update tests 2004-02-03 22:07:29 +00:00
foobar
7ad385b109 CS fix (functions should not be available if they are not available :) 2004-02-02 08:10:31 +00:00
Marcus Boerger
95c15b024a Add new test 2004-01-22 21:55:09 +00:00
Marcus Boerger
66ed0a49fa Update tests 2004-01-22 21:47:54 +00:00
Rob Richards
bc2521b662 Fix bug #27010: segfault after returning nodes with children()
Fix segfault in match_ns when matching prefix and node without ns
some general cleanup and code consilidation
better write handling - engine support dependent
better isset handling - engine support dependent
namespace fixes for reading/writing
2004-01-22 21:30:14 +00:00
Rob Richards
a4c2f31751 Fix namespace regression bug
Read attributes correctly
Update sxe_prop_dim_exists logic
Update profile
2004-01-21 14:04:47 +00:00
Rob Richards
500fa86c1b Fix Bug #26976 (Can not access array elements using array indices)
return index 0 as non iterable object
update test
2004-01-21 11:32:30 +00:00
foobar
21d5052f70 typo fix 2004-01-21 03:18:13 +00:00
foobar
4716c724d2 test for bug #26976 2004-01-21 03:17:07 +00:00
foobar
bdd3b13c53 Goto targets should not be indented (some compilers choke on this, iirc) 2004-01-21 01:09:41 +00:00
Sterling Hughes
bd306c8b52 - 2004-01-20 05:31:50 +00:00
Frank M. Kromann
0d6fcd02cb Fix compilation of simplexml when spl is build as shared object 2004-01-19 23:44:03 +00:00
Marcus Boerger
b0620b27be Rename header to prevent name clashes with external files 2004-01-18 23:35:13 +00:00
Marcus Boerger
517c5f5fc5 Necessary as long as SPL is shared/dll 2004-01-18 22:20:54 +00:00
Marcus Boerger
913f5ce8ec Fix Warning 2004-01-18 15:21:49 +00:00
Marcus Boerger
8f4e9d9e42 Enable inherited classes inside SPL and respect order of module init. 2004-01-18 15:16:26 +00:00
Marcus Boerger
bb678c07b5 Use external files only in 001.phpt & tests for bugs 2004-01-18 15:14:03 +00:00
Marcus Boerger
9d5ef0070f Export access to class_entry by function. 2004-01-18 13:19:41 +00:00
Sterling Hughes
6bd7c45f74 update the tests proper-like 2004-01-17 21:47:43 +00:00
Sterling Hughes
594f6433af update the examples 2004-01-17 21:44:22 +00:00
Sterling Hughes
cb7e90119f namespace accesses are now soley URI based as opposed to prefix based. 2004-01-17 21:22:26 +00:00
Derick Rethans
c74bb58721 - Fix typoes 2004-01-17 20:20:18 +00:00
Jon Parise
c303c352d0 Spell 'element' correctly. 2004-01-17 20:02:01 +00:00
Marcus Boerger
9e29f17493 Major bugfix for consistency.
# After long discussions we came to a conclusion on how to make this
# extension consistent in itself.
# Thanks to Rob for all the work
2004-01-17 19:41:32 +00:00
Marcus Boerger
4ee7ba05bc Drop the external xml files no longer needed 2004-01-17 17:34:22 +00:00
Marcus Boerger
c28af3a660 No external xml files 2004-01-17 17:33:10 +00:00
Marcus Boerger
253c97fbfe Don't use external xml files 2004-01-17 17:24:58 +00:00
Sterling Hughes
d022278068 remove the parser errors here, so they accurately reflect what should happen. 2004-01-17 16:39:52 +00:00
Marcus Boerger
665a834a76 Fix parameter list and protos 2004-01-17 16:36:04 +00:00
Marcus Boerger
9c2e37e89a Add test for inherited simplexml classes 2004-01-17 15:57:06 +00:00
Marcus Boerger
9df72efb7c Make inherited sxe classes work 2004-01-17 15:56:29 +00:00
foobar
f4983c0d3f - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 2004-01-17 13:00:38 +00:00
Sterling Hughes
a895106606 update the profile of how namespaces should work after discussions with
shane and rob richards.  there were a lot of race conditions with regards
to the way namespaces have been handled in XML documents so far, this new
method removes the race conditions, and gives me a real reason to add the
children() and attributes() methods.
2004-01-16 22:26:09 +00:00
Sterling Hughes
7f5b508f26 Add a "profile" of simplexml's expected behaviour in the form of tests.
This will be expanded as issues arise and will be a formal definition
(in code) of simplexml's behaviour.
2004-01-16 20:50:29 +00:00
Marcus Boerger
43b0a9e96b Drop userspace iteration correctly.
# People if you do such things then please fix the class tree.
2004-01-15 09:28:01 +00:00
Marcus Boerger
6915f5a2f5 This is no longer usefull in any way. 2004-01-14 22:07:28 +00:00
Rob Richards
8a40a946de test user define namespace aliases 2004-01-14 19:00:16 +00:00
Rob Richards
ad47abf0f6 add support for $foo["a:bar"]
fix xsearch to only return values for text,element and attribute nodes
fix getChildren and return array
remove most methods
update test
2004-01-13 21:28:41 +00:00