Compare commits

...
Author SHA1 Message Date
SVN Migration 3aacc966e2 This commit was manufactured by cvs2svn to create tag 'php_5_0_1RC1'. 2004-08-10 07:17:06 +00:00
Andi Gutmans 71be1ed5f1 - 5.0.1RC1 2004-08-10 07:17:05 +00:00
Moriyoshi Koizumi 1c6896076f - Bugfix #29493 (extract(array, EXTR_REFS) misbehaves with elements referred
twice or more times)
2004-08-10 06:01:20 +00:00
Andi Gutmans 6a2d265af6 - The documentation team has re-wroten the installation part of the manual. 2004-08-10 05:36:12 +00:00
Ilia Alshanetsky 6fe9c3735a MFH: Fixed bug #29581 (Typo inside php.ini comments for mysql.trace_mode). 2004-08-10 00:44:23 +00:00
Andi Gutmans 5d43cf4ec4 - Update NEWS 2004-08-09 22:24:10 +00:00
Andi Gutmans 8b3b1eb121 Update credits for php docs 2004-08-09 21:53:19 +00:00
Dmitry Stogov 836a7b1a88 Included ext/soap fixes from CVS HEAD. 2004-08-09 05:50:06 +00:00
Georg Richter c26edafb17 fixed bug #29577 (MYSQLI_CLIENT_FOUND_ROWS undefined) 2004-08-09 04:33:40 +00:00
Ilia Alshanetsky a9bf810ba2 Remove \r characters from file. 2004-08-08 21:25:55 +00:00
Christian Stocker a737e92b08 Fixed bug #29573. 2004-08-08 18:09:46 +00:00
Christian Stocker 54ae55a949 MFH (fix for Bug #29573 : Segmentation fault when php function(called from XSLT templat) throw exception
and Zero Byte Memory Leaks)
2004-08-08 18:05:47 +00:00
Wez Furlong 5ab53094fa BFN 2004-08-07 21:04:51 +00:00
Wez Furlong aff24aed0d MFH: Fix for Bug #29490 from Michael Sisolak 2004-08-07 21:01:43 +00:00
Sara Golemon b915644ec4 MFH ZTS Fix 2004-08-06 17:35:59 +00:00
Wez Furlong 28c71a667a MFH: avoid possible segfault with stream_socket_client and bogus flags. 2004-08-06 14:18:49 +00:00
Ilia Alshanetsky d45c4f86d3 MFH: php_error() -> php_error_docref() 2004-08-05 23:57:53 +00:00
Edin Kadribasic 8060534f63 MFH: Export php_libxml_error_handler for windows build (#29541) 2004-08-05 21:03:15 +00:00
Antony Dovgal 80bdf7eae5 MFH: remove all references to @ thing, as it's not recommended 2004-08-05 14:19:59 +00:00
Ilia Alshanetsky 2dad2b3882 MFH: Eliminate unneeded variable. 2004-08-05 00:44:32 +00:00
Frank M. Kromann aa0a80bea8 Revert. ADD_EXTENSION_DEP is available in this branch! 2004-08-04 19:22:12 +00:00
Frank M. Kromann dec171c4bf No extension dependency in this branch 2004-08-04 17:22:14 +00:00
Frank M. Kromann 6d5779844f MFH: Move iconv exports to the iconv extension and make libxml depend on iconv 2004-08-04 17:13:11 +00:00
SVN Migration 94ed0368b9 This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-08-04 16:46:49 +00:00
Zeev Suraski 6c8d9c8c8e Fix prototypes 2004-08-04 16:39:56 +00:00
Zeev Suraski 9de0be49d6 Fix prototypes 2004-08-04 14:40:53 +00:00
Georg Richter 5a76218edd fixed bug #29522 2004-08-04 13:02:40 +00:00
Marcus Boerger d84c321376 MFH missing part 2004-08-04 10:32:43 +00:00
Ilia Alshanetsky b3262ff512 MFH: Fixed argument handling in sun* functions. 2004-08-04 00:28:05 +00:00
Edin Kadribasic a825563c0b Typofix 2004-08-03 22:56:15 +00:00
Edin Kadribasic da476e0da9 MFH 2004-08-03 22:50:18 +00:00
Marcus Boerger 46107c39a4 MFH 2004-08-03 17:10:58 +00:00
Marcus Boerger a263d88c81 BFN 2004-08-03 17:07:56 +00:00
Marcus Boerger 9158cd2494 - MFH Bug #29505 get_class_vars() severely broken when used with arrays 2004-08-03 17:02:35 +00:00
SVN Migration 2e98f2dd1a This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-08-03 16:59:54 +00:00
Antony Dovgal 902b4bda6a MFH: typo in ini parameter name 2004-08-03 06:26:59 +00:00
Antony Dovgal 87b52bb5cd MFH: fix typo in php.ini-dist & php.ini-recommended 2004-08-03 06:21:17 +00:00
Greg Beaver e6199b5279 commit for win32 - binary so line endings are always preserved - ..and in PHP_5_0, where it also belongs 2004-08-03 04:36:56 +00:00
SVN Migration e7f995106c This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-08-03 04:36:01 +00:00
Ilia Alshanetsky 3bcb1f3af1 MFH: Allow sqlite_fetch_column_types() to properly handle table names with
spaces in them.
2004-08-02 22:43:42 +00:00
Marcus Boerger 13a652c81c MFH Change to use memcmp instead of strcmp 2004-08-02 22:43:16 +00:00
Ilia Alshanetsky 5ddd062e36 MFH: A gentler (performance wise) allocation of buffer for temp variables. 2004-08-02 02:35:03 +00:00
Marcus Boerger 4bedc6bb31 - Add new tests 2004-08-01 21:55:58 +00:00
Marcus Boerger 70f94e52ea - Enforce protocol on magic methods/functions 2004-08-01 21:55:39 +00:00
Wez Furlong 87c3363fa9 MFH usleep fix, and BFN. 2004-08-01 00:35:11 +00:00
Wez Furlong ca1dc06e04 MFH: zts fix 2004-07-31 16:37:18 +00:00
Wez Furlong b5ed0a1d3d MFH: streams fixes 2004-07-31 11:00:11 +00:00
Wez Furlong 19c8eeb4e8 MFH: zts fix for ini entries and dl() 2004-07-30 15:05:02 +00:00
Wez Furlong 293e62c99d MFH: win32 zts fix 2004-07-30 14:39:18 +00:00
Wez Furlong 2da7dd5982 MFH: various ZTS fixes 2004-07-30 14:24:59 +00:00
Edin Kadribasic 6325b1b630 MFH 2004-07-30 12:40:54 +00:00
Edin Kadribasic 9244e0eee1 MFH 2004-07-30 09:59:06 +00:00
Edin Kadribasic 712d951ffc MFH 2004-07-30 09:30:30 +00:00
Ilia Alshanetsky 40773632e0 MFH: Fixed bug #29443 (Sanity check for wbmp detection). 2004-07-30 01:10:42 +00:00
Edin Kadribasic 88628a2319 MFH 2004-07-29 22:26:52 +00:00
Edin Kadribasic 31120ba5f7 MFH: Fix informix compilation on Windows (bug #29340) 2004-07-29 21:12:47 +00:00
Timm Friebe 75276870db - MFH:
. Fixed bug #29064 (Exact numeric/decimal/money datatypes lose precision)
  . Fixed bug #27843 (sybase_query() triggers (spurious?) notices when
    query is a stored procedure)
  . Fixed multiple memory leaks with sybase_unbuffered_query()
  . Changed sybase_query() to ignore store_results = false in  buffering
    mode, it would yield unpredictable results
  . Fixed sybase_unbuffered_query() when used with store_results = false
  . Changed sybase_fetch_object() to ignore second argument when passed
    as NULL
  . Made sybase_data_seek() error message more verbose
  . Fixed memory leak in shutdown when not all rows where selected in an
    unbuffered query
# sort of, empty_string -> STR_EMPTY_ALLOC patch ommitted
2004-07-29 20:05:46 +00:00
SVN Migration fc0b122460 This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-07-29 03:58:02 +00:00
Ilia Alshanetsky d976c362ac MFH: Fixed but #29437 (Possible crash inside array_walk_recursive()). 2004-07-29 00:35:12 +00:00
Wez Furlong 6c82c26884 BFN 2004-07-29 00:17:01 +00:00
Wez Furlong a0ef3e1865 MFH: #29431 2004-07-28 23:53:04 +00:00
Wez Furlong 4f91645642 MFH:
#29258: variant_date_from_timestamp() does not honour timezone
#29392: com_dotnet crashes when echo'ing an object
2004-07-28 23:48:26 +00:00
Wez Furlong 46b2bef868 Moved to PECL 2004-07-28 23:39:36 +00:00
Ilia Alshanetsky 26319ee1a1 MFH: Better address availability check. 2004-07-28 23:34:30 +00:00
Ilia Alshanetsky 42a8242676 MFH: Fixed possible crash in stream_socket_recvfrom() when length
parameter has a negative value.
2004-07-28 23:21:56 +00:00
Marcus Boerger 57ab773c70 MFH 2004-07-28 22:55:26 +00:00
Andi Gutmans 219364ee55 - Fix MAC OSX to always use native DSO loading 2004-07-28 19:07:26 +00:00
Christian Stocker 8b5fc29c7a MFH
Fixed bug #29409 (Segfault in PHP functions called from XSLT). (Rob)
2004-07-28 12:42:16 +00:00
Ilia Alshanetsky 21f4b69b2b MFH: Fixed bug #29342 (strtotime() does not handle empty date string
properly).
2004-07-28 01:44:41 +00:00
Ilia Alshanetsky f76ce400eb MFH: Fixed bug 29395 (sqlite_escape_string() returns bogus data on empty
strings).
2004-07-27 16:40:46 +00:00
Ilia Alshanetsky 16204148bb MFH: Added missing comma. 2004-07-27 12:44:35 +00:00
Ilia Alshanetsky 1f2d017ae1 MFH: Fixed bug #29349 (imagecreatefromstring() crashes with external GD
library).
2004-07-27 00:27:07 +00:00
Georg Richter 1b10ad424a MFH: fixed bug 29335 2004-07-26 07:22:01 +00:00
Georg Richter 3e65f6bf57 MFH: fixed bug in mysqli->client_version 2004-07-26 05:45:41 +00:00
Marcus Boerger f84d03b2bc - Update/Add tests 2004-07-25 19:35:30 +00:00
SVN Migration 2db28891e4 This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-07-25 19:21:22 +00:00
Ilia Alshanetsky 7adc26fd8b MFH: Fixed bug #29369 (Uploaded files with ' or " in their names get their
names truncated at those characters).
2004-07-25 19:19:28 +00:00
Marcus Boerger fe80df5446 BFN 2004-07-25 17:38:44 +00:00
Marcus Boerger 8588815ef3 - MFH: Fix bug #29368 : The destructor is called when an exception is
thrown from the constructor
2004-07-25 17:37:55 +00:00
Georg Richter a70fc67b0b fixed bug #29311 2004-07-23 12:48:20 +00:00
SVN Migration b5c53ae6c7 This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-07-23 12:47:37 +00:00
Edin Kadribasic 3d018fb061 MFB: Updated version number 2004-07-23 02:28:36 +00:00
Ilia Alshanetsky 3845e2c145 MFH: Fixed bug #29333 (output_buffering + trans_sess_id can corrupt output) 2004-07-23 02:05:51 +00:00
Stefan Esser 1930c2c33b MFH 2004-07-22 22:59:11 +00:00
SVN Migration 1e2b92b517 This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-07-22 22:39:01 +00:00
Marcus Boerger 983fa5a21e Fix testcase 2004-07-22 18:39:45 +00:00
Georg Richter 3ecbb5c314 MFH: changed warning (bug #29298) for outdated client library 2004-07-22 07:25:31 +00:00
Sara Golemon 8fa1628958 MFH: This should fix binary safety for bound results. 2004-07-22 03:26:59 +00:00
Edin Kadribasic e52b580cad MFH: Fix for #28929 by Michael Sisolak 2004-07-21 22:53:27 +00:00
Edin Kadribasic 4b28e0a8f1 MFH: Build fix 2004-07-21 22:22:21 +00:00
Ilia Alshanetsky 91f5ceb3be MFH: Fixed bug #29209 (imap_fetchbody() doesn't check message index). 2004-07-21 21:57:09 +00:00
Marcus Boerger 603758b484 BFN 2004-07-21 18:38:23 +00:00
Marcus Boerger b6b575c1d5 MFH: Fixded #29291: get_class_vars() return names with NULLs 2004-07-21 18:37:36 +00:00
Christian Stocker e2f3142c78 MFH. Fix for Bug 29010 "make test does not wait to email address" (by Sebastian Nohn) 2004-07-21 11:20:33 +00:00
Ilia Alshanetsky 7623887079 MFH: Abort earlier on invalid format. 2004-07-21 00:14:50 +00:00
Moriyoshi Koizumi 1bd6ec4c91 - MFH (ctype.c: 1.31): Correct range checks.
- MFH (ctype.c: 1.31): Normalize negative values.
2004-07-20 20:09:27 +00:00
Moriyoshi Koizumi 33a6aefce8 oops... 2004-07-20 19:36:00 +00:00
Marcus Boerger d3f8aaecd8 BFN 2004-07-20 19:30:09 +00:00
Marcus Boerger 049cca1711 MFH 2004-07-20 19:25:18 +00:00
Moriyoshi Koizumi a40df45348 - MFH (iconv.c: 1.119): Fix possible leaks / segfaults in persistent iconv
filter.
2004-07-20 18:48:23 +00:00
Marcus Boerger 8f42eaae01 BFN 2004-07-20 18:25:48 +00:00
Marcus Boerger ebeefd9f7d MFH bugfix 28895 2004-07-20 18:23:49 +00:00
Moriyoshi Koizumi 646f9a4a8b - MFH (filters.c: 1.41): Add more null checks. 2004-07-20 18:17:07 +00:00
Moriyoshi Koizumi b4fa1661af - MFH (filters.c: 1.40): pemalloc() might return NULL 2004-07-20 18:04:36 +00:00
Stanislav Malyshev ba3c63dbc9 export ini parser 2004-07-20 08:45:04 +00:00
Sebastian Bergmann 350535d498 BFN: Fixed ReflectionClass::getMethod() and ReflectionClass::getProperty() to raise an ReflectionException instead of returning NULL on failure. 2004-07-20 05:48:45 +00:00
Ilia Alshanetsky 467caa4307 MFH: Fixed bug #29226 (ctype_* functions missing validation of numeric
string representations).
2004-07-20 01:03:18 +00:00
Sergey Kartashoff 01b6956d61 - A Bug #29147 was fixed. Thanks to Antony Dovgal <tony2001 at phpclub.net>
for his patch.
2004-07-19 19:46:52 +00:00
Marcus Boerger 61c3a669b4 - MFH protos and error message 2004-07-19 19:24:37 +00:00
Moriyoshi Koizumi befb6e9b80 - MFH (bug29119.phpt: 1.2): Fix test name 2004-07-19 18:49:46 +00:00
Moriyoshi Koizumi 35e43dabe1 - MFH (html.c: 1.98, bug29199.phpt: 1.1): Fix bug #29199 (html_entity_decode()
misbehaves with UTF-8)
2004-07-19 17:53:00 +00:00
SVN Migration b905779950 This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-07-19 17:51:42 +00:00
Moriyoshi Koizumi 04c32887f1 - MFH (iconv.c: 1.118): Fix a bug in iconv stream filter that prevents
pending buckets from being processed.
2004-07-19 08:35:48 +00:00
Moriyoshi Koizumi e0a39d68d8 - MFH (config.m4: 1.52): Fix VPATH build. (patch by Joe Orton) 2004-07-19 05:09:46 +00:00
Moriyoshi Koizumi 92ec8541c1 - MFH: rename php_compat.h to php_onig_compat.h to avoid name conflict.
(reported by Joe Orton, thanks.)
2004-07-19 05:06:01 +00:00
SVN Migration 82a7ef78f3 This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-07-19 05:04:34 +00:00
Ilia Alshanetsky 236c42c14e MFH: Fixed bug #28633 (sprintf incorrectly adding padding to floats). 2004-07-18 17:28:04 +00:00
SVN Migration b8fdc56a8b This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-07-18 17:27:51 +00:00
Rob Richards 17ad61bd7f enable exslt support for win32 builds
WS fixes for exslt tests
2004-07-18 13:22:46 +00:00
Rob Richards ec1507ea9d add missing optional value param to createElementNS (chregu) 2004-07-18 13:15:50 +00:00
Rob Richards 69bd1f31fd Fixed bug #29221 (Segfault using DOM ownerDocument in a PHP object) 2004-07-18 11:44:25 +00:00
Moriyoshi Koizumi b9d4af72e9 - MFH (sapi_apache2.c: 1.41): request_dtor should be called if a fatal error
occurs during activation phase.
2004-07-17 21:31:43 +00:00
Sara Golemon fbbc036830 BFN 2004-07-16 23:45:21 +00:00
Sara Golemon c2b0fdd647 MFH: convert.* filters not consuming buckets_in on PSFS_FLUSH_* 2004-07-16 23:42:00 +00:00
Marcus Boerger 3706b626fe BFN 2004-07-16 07:27:34 +00:00
Marcus Boerger edbfc48fdd MFH 2004-07-16 07:26:49 +00:00
Ilia Alshanetsky 59c6886c65 Fixed bug #28800 (strings beginning with "inf" improperly converted). 2004-07-16 02:02:09 +00:00
SVN Migration 8091552925 This commit was manufactured by cvs2svn to create branch 'PHP_5_0'. 2004-07-15 19:41:23 +00:00
Marcus Boerger 1916223883 - Fix prototype 2004-07-15 19:41:22 +00:00
Marcus Boerger f2377c4d1f Synch comments 2004-07-15 19:09:37 +00:00
Dan Kalowsky f20849d12e Bug 29058 (patch submitted by bug reporter) 2004-07-15 15:09:12 +00:00
Magnus M��tt� cfc8accd3e Test for bug 26737:
Protected and private variables are not saved on serialization
when a user defined __sleep is used.
2004-07-15 11:52:04 +00:00
Antony Dovgal f6eb507b2c fix #29012 (Potential race during first connection) thanks to cjbj at hotmail dot com 2004-07-15 11:00:14 +00:00
Ilia Alshanetsky a75608c1de Fixed Bug #29075 (strnatcmp() incorrectly handles whitespace).
# Original Patch by: curt@php.net
2004-07-15 01:26:03 +00:00
5a9875f293 ChangeLog update 2004-07-15 00:33:10 +00:00
Edin Kadribasic 546e5bbc43 Made php -m output sorted case-insensitevly 2004-07-14 22:30:29 +00:00
Stefan Esser 90f151470c same bug. 2004-07-14 09:55:24 +00:00
Derick Rethans edce707f3b - Fixed text. 2004-07-14 09:54:02 +00:00
Stefan Esser 446f4d1bc2 Security Fix broken! Destroyed Basic auth. Blame: me
4.3.x not affected
2004-07-14 09:43:26 +00:00
Stanislav Malyshev d673ec0184 be consistent with write_dimension 2004-07-14 09:04:13 +00:00
Stanislav Malyshev 28d72ce2fd fix #28957 2004-07-14 09:01:58 +00:00
John Coggeshall 51ae1cc7bd Changing the Tidy version to 2.0 2004-07-14 02:41:53 +00:00
12c826c2e7 ChangeLog update 2004-07-14 00:33:30 +00:00
Sara Golemon c4bf45e39a Bugfix# 28829 bcmath values for 0, 1, and 2 initialized/freed at wrong time for threaded sapis. 2004-07-14 00:14:43 +00:00
Zeev Suraski 2ec89aa8e1 Add {{{ proto's 2004-07-13 20:41:55 +00:00
Andi Gutmans c18badbfbf - 5.0.1-dev 2004-07-13 19:56:49 +00:00
Marcus Boerger 1ea22c9004 Bugfix #29116 Zend constant warning uses memory after free (jdolecek at NetBSD dot org) 2004-07-13 19:22:11 +00:00
Andi Gutmans 399e2ca69f - Roll PHP 5.0.0 2004-07-13 19:05:31 +00:00
Wez Furlong cfb84391d0 add missing break 2004-07-13 17:14:49 +00:00
Georg Richter bfd3c9ecfb prototype fixes 2004-07-13 17:04:16 +00:00
Rob Richards d64a00da04 initial xmlwriter code 2004-07-13 17:01:30 +00:00
Wez Furlong 971fcd4254 Looks like Sara forgot to change this too. 2004-07-13 16:34:56 +00:00
Georg Richter f61dbf06a1 changed mysqli_stmt_reset (returns now bool instead of void) 2004-07-13 16:12:28 +00:00
Stefan Esser 0b9d614988 Fixed typo 2004-07-13 11:30:50 +00:00
Alan Knowles 6284b34e6e remove test dependance on postgres ** this still fails however 2004-07-13 07:20:45 +00:00
Alan Knowles ad2b89c9a3 ensure that test passes on systems without postgres built in. 2004-07-13 07:12:06 +00:00
196259d334 ChangeLog update 2004-07-13 00:32:43 +00:00
Wez Furlong ae40d0ef2a Fix file_get_contents() bug... 2004-07-12 20:59:24 +00:00
Timm Friebe e532feb29c - Initial release 2004-07-12 20:26:53 +00:00
Ilia Alshanetsky 905fbfd85e Added missing constant and correct bound column retrieval. When bound
columns are specified only return status (TRUE/FALSE) indicator.
2004-07-12 20:12:39 +00:00
Ilia Alshanetsky ddb32b11b2 Fixed a bug that could result in false failed query reporting on
INSERT/UPDATE/DELETE queries.
2004-07-12 20:09:19 +00:00
Ilia Alshanetsky 11371cd0a8 Missing patch. 2004-07-12 18:49:47 +00:00
Ilia Alshanetsky 7daa1cfecc Fixed bug #28999 (fixed behaviour of exec() to work as it did in 4.X). 2004-07-12 18:48:30 +00:00
Ilia Alshanetsky a8996a8ac6 Fixed bug #29086 & #28064 (PHP crashes on extremly long scripts). 2004-07-12 17:47:29 +00:00
Ilia Alshanetsky 0ad4c5037c Touch the file so that build system does not try to rebuild it. 2004-07-12 17:44:40 +00:00
Andi Gutmans 334ddd1248 - Convert zend_class_entry -> zend_class_entry * 2004-07-12 16:38:45 +00:00
Christian Stocker 14a61929b9 implement the clone code for the XSLTProcessor object and fix #29108
"xslt segfaults when ze1_compatibility_mode is on" (By Rob Richards)
2004-07-12 13:04:01 +00:00
Antony Dovgal 08486a0ea3 fix #28978 (multiple OCIBindByName on the same placeholder eats memory) 2004-07-12 07:40:05 +00:00
83e4bb727b ChangeLog update 2004-07-12 00:32:48 +00:00
Andrey Hristov c401890d17 reorder + add 2004-07-11 21:41:33 +00:00
Andrey Hristov 0eef82a733 fixing bug #28974 : overflow in array_slice()
The same kind of overflow appeared in array_splice(), substr() and
substr_replace()
2004-07-11 21:15:04 +00:00
Stefan Esser 0e8de752fd Ooups... 2004-07-11 21:14:50 +00:00
Stefan Esser 8c075de7c7 Fixed: PARSE_TYPE parameter to input_filter
Fixed: input_filter should also be able to filter empty variables by name
2004-07-11 20:13:39 +00:00
Andrey Hristov 268d3d7ba3 fixing bug #28739
array_*diff() and array_*intersect() not clearing the fci cache before work.
FCI call cache was introduced in HEAD. All functions that perform sorting
of arrays clear the fci cache before work. array_*diff() and\ array_*intersect()
were somehow missed to be updated.
2004-07-11 19:20:05 +00:00
Andrey Hristov bc69bdb01a fixing the name of the test 2004-07-11 18:19:43 +00:00
Andrey Hristov 7af08c0c34 fixing bug 29038:
EXTR_PREFIX_SAME is prevented from creating a new variable when the key
is a empty string. EXTR_PREFIX_ALL is also prevented from doing that,
but works for numbers.
2004-07-11 18:18:05 +00:00
Timm Friebe cd75bd4f65 - Initial release 2004-07-11 16:57:38 +00:00
Timm Friebe a14c66445a - Added simple test for float exceeding the float precision
# See bug #29064
2004-07-11 16:57:12 +00:00
Timm Friebe 1e6ccabd5f - Initial release 2004-07-11 16:31:32 +00:00
Timm Friebe d6c0fdfd2f - Initial release 2004-07-11 16:10:03 +00:00
Ilia Alshanetsky 4ebcb2ecfe Fixed bug #29008 (array_combine() does not handle non-numeric/string keys). 2004-07-11 15:23:57 +00:00
ed6ebf011b ChangeLog update 2004-07-11 00:33:01 +00:00
Jon Parise d46f8078f5 DragonFly BSD is derived from FreeBSD and requires the same floating point
precision fix.
2004-07-10 19:29:01 +00:00
Wez Furlong a0957e24b7 Fix #28402: no need for -ldl 2004-07-10 12:49:34 +00:00
Wez Furlong b52f7a01af Bump PHP 5 sqlite extension number to 2.0
(put some distance between it and the 4.3 version)
2004-07-10 12:30:18 +00:00
Wez Furlong e563b4eafa Upgrade bundled library to 2.8.14 + misc fixes
(http://www.sqlite.org/cvstrac/chngview?cn=1742)
2004-07-10 12:27:51 +00:00
Wez Furlong cd732f1a3f RIP: greedy ready problems
This allows people to use fread($fp, filesize($filename)) for regular files,
but packet-based non-greedy reads for everything else.
2004-07-10 10:54:09 +00:00
Andi Gutmans e5cfb1d05c - Better stability during premature shutdown of request startup 2004-07-10 07:46:17 +00:00
Ilia Alshanetsky 41b639fffe Fixed function proto. 2004-07-09 17:49:08 +00:00
69e20cf219 ChangeLog update 2004-07-09 00:33:24 +00:00
Ilia Alshanetsky 79c28f7618 Fixed bug #29049 (array sorting via user function/method does not validate
it).
2004-07-08 17:07:22 +00:00
Sergey Kartashoff c176a0ae20 - A bugfix in search words hilightling code (mnogosearch extension). 2004-07-08 05:22:14 +00:00
Ilia Alshanetsky f28b063c28 Last dangerous alloca() bits. 2004-07-08 01:18:43 +00:00
e080db4303 ChangeLog update 2004-07-08 00:32:27 +00:00
Edin Kadribasic 5e605e6dc2 Added memory-limit to the list of excluded force-on options 2004-07-07 12:25:10 +00:00
Georg Richter 9db1075c0e added check in config.m4 for deprecated library
added support for new 4.1.3-beta functions
	mysqli_stmt_field_count
	mysqli_stmt_attr_set
	mysqli_stmt_attr_get
removed support for deprecated/old api functions
fixed bug in constructor_get
2004-07-07 08:02:27 +00:00
1d89ed6ee3 ChangeLog update 2004-07-07 00:32:37 +00:00
Ilia Alshanetsky 5201e62d0d Fixed bug #29034 (wordwrap() returns a boolean when passed empty string). 2004-07-06 22:16:42 +00:00
Sergey Kartashoff c144fdf680 - Some fixes in mnogosearch extension 2004-07-06 19:08:45 +00:00
Marcus Boerger a2592aa5fb - Revert storing handle, got lost in 1.92, noticed by Kamesh Jayachandran
<kameshj at fastmail dot fm>
2004-07-06 18:48:39 +00:00
Ard Biesheuvel 1b4e0b81e3 Don't copy ini items to module globals
(fixed unregistered bug with mangled default_db setting)
2004-07-06 13:46:19 +00:00
Sebastian Bergmann b5aa8db6a3 Fix ZTS build. 2004-07-06 08:01:07 +00:00
Dmitry Stogov 8ad22e4279 Fixed bug #28751 (SoapServer does not call _autoload()) 2004-07-06 07:30:33 +00:00
ea5dc3d577 ChangeLog update 2004-07-06 00:33:32 +00:00
Ilia Alshanetsky 7f7f566318 Eliminate alloca() calls where they can be affected by the users. 2004-07-05 21:31:35 +00:00
Ilia Alshanetsky 2ba792cd0b Don't use alloca() where it can reached by the users. 2004-07-05 21:16:29 +00:00
Marcus Boerger c884ad017c - Bugfix: #29019 Database not closing 2004-07-05 19:36:10 +00:00
Andi Gutmans 82b4d74fd4 - Disable zend_mm for 5.0.0 2004-07-05 17:06:41 +00:00
Sascha Schumann f51ff68dfa - revert to proper behaviour 2004-07-05 11:41:31 +00:00
Moriyoshi Koizumi 8989a96789 - Add test for bug #28325. 2004-07-05 07:53:41 +00:00
447223f48a ChangeLog update 2004-07-05 00:32:17 +00:00
Ilia Alshanetsky d5fc8152f3 Eliminate potentially dangerous alloca(). 2004-07-04 17:13:58 +00:00
Ilia Alshanetsky a41a54f7fa Fixed bug #28963 (Missing space for \0 in address allocation). 2004-07-04 16:52:59 +00:00
Marcus Boerger c5b9577df8 Fix TSRM build 2004-07-04 11:14:17 +00:00
beb3674b7a ChangeLog update 2004-07-04 00:32:20 +00:00
Moriyoshi Koizumi 0f2c97f627 BFN 2004-07-03 16:14:46 +00:00
Moriyoshi Koizumi a92af73136 - Bugfix #28325 (circular reference serialisation). 2004-07-03 16:10:28 +00:00
ac3b484388 ChangeLog update 2004-07-03 00:32:18 +00:00
Andi Gutmans c3e9cd9c91 - Should fix mem leak with ZEND_MM. I made this change a while ago and
- rolled it back but I don't remember why. Please test!
2004-07-03 00:16:39 +00:00
ae5301c5d5 ChangeLog update 2004-07-02 00:32:17 +00:00
Ilia Alshanetsky 2ba0608e48 Do not use alloca() where it can be easily abused by the users.
# This probably should go into reflection code as well.
2004-07-01 16:28:32 +00:00
Sterling Hughes e8f984d77a fix bug wrt to CURLOPT_POSTFIELDS where if you passed it code like:
$fields = array('foo' => 'bar');
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_exec($ch);
as opposed to :

curl_setopt($ch, CURLOPT_POSTFIELDS, array('foo' => 'bar'));

you'll get a segv or no results, depending on the mood and cycle of the
moon.
2004-07-01 06:50:46 +00:00
Sara Golemon 76766f2d31 That hashtable should never have been an argument.... 2004-07-01 04:43:29 +00:00
d24e005477 ChangeLog update 2004-07-01 00:32:13 +00:00
Frank M. Kromann e0fe48e8a0 Fix for #28512. news entry 2004-06-30 19:51:28 +00:00
Frank M. Kromann 2067ce4079 Fix for #28512. Allocate enough space to store data 2004-06-30 19:46:57 +00:00
Ilia Alshanetsky bdfd8c60ea Another instance where alloca() is not needed. 2004-06-30 13:43:16 +00:00
Ard Biesheuvel 81dbc2fcef Fixed Ilia's alloca() issue/exploit
Removed pointless RINIT()
Use macros for consistent resource type names
2004-06-30 10:55:03 +00:00
Ilia Alshanetsky 690ca62dd3 Do not use alloca() where it can be abused through user input. 2004-06-30 01:12:06 +00:00
0850c7a348 ChangeLog update 2004-06-30 00:32:27 +00:00
Wez Furlong 8f435013ff Fix for Bug #28964 fread "greedy" behaviour 2004-06-29 21:51:53 +00:00
2aa678b088 ChangeLog update 2004-06-29 00:32:44 +00:00
Ilia Alshanetsky ed7d1e82c6 Removed pointless allocation check. 2004-06-28 22:31:28 +00:00
Sebastian Bergmann b163696106 Fix #28921 (Bad grammar in INSTALL). 2004-06-28 16:41:01 +00:00
Derick Rethans da2a1977b5 - Fixed bug with leap year checking. 2004-06-28 14:33:57 +00:00
Ard Biesheuvel 77804efa77 Revert at Derick's request 2004-06-28 11:41:08 +00:00
Ard Biesheuvel d1efeb2e58 BFN 2004-06-28 11:28:12 +00:00
Ard Biesheuvel 16e2d61435 MFB Fixed bug #28897 (-1 returned as -0.000 for 64-bit scaled int) 2004-06-28 11:27:05 +00:00
98672f41ba ChangeLog update 2004-06-28 00:33:21 +00:00
Ilia Alshanetsky 53bf5ccbea Removed unneeded if(). 2004-06-27 21:49:47 +00:00
Marcus Boerger 91f0369c80 Add more tests 2004-06-27 13:28:01 +00:00
Marcus Boerger 46e9abe602 Add more tests 2004-06-27 13:15:31 +00:00
99b5263afd ChangeLog update 2004-06-27 00:32:20 +00:00
Marcus Boerger 962b593455 BFN 2004-06-26 22:08:19 +00:00
Moriyoshi Koizumi d200a703e7 *** empty log message *** 2004-06-26 17:04:39 +00:00
Uwe Schindler 3bb7e73656 replace strncpy with strlcpy 2004-06-26 10:30:07 +00:00
Stefan Esser 59d55efb17 As long we pass values by reference this is needed. Ugly! 2004-06-26 08:09:28 +00:00
Stefan Esser ff716cbd3e Fixed input_filter functions need emalloc()ed values. 2004-06-26 07:57:37 +00:00
Stefan Esser 9e5ea7d229 strip_tags() news 2004-06-26 07:46:08 +00:00
Stefan Esser a27d5d842a IE we love you all... 2004-06-26 07:43:02 +00:00
Moriyoshi Koizumi 4eccf848ec - WS 2004-06-26 05:41:14 +00:00
Moriyoshi Koizumi b33f7ab671 - Fix bug #28466 (mbstring_convert_variables() problem). 2004-06-26 05:39:00 +00:00
f125cb60cc ChangeLog update 2004-06-26 00:32:25 +00:00
Edin Kadribasic 42f7b8026c MFB: Memory leak fix (patch by Joe Orton)
Fixes #28113. Adapted to php5 by Magnus Määttä.
2004-06-25 13:00:48 +00:00
Wez Furlong 5aa568254a export zend stream functions for zend extensions under windows 2004-06-25 12:55:11 +00:00
2f94546824 ChangeLog update 2004-06-25 00:32:18 +00:00
Sara Golemon a4032b68c6 Ease off on severity of new error (Using Resources as array offsets) 2004-06-24 16:35:34 +00:00
Ilia Alshanetsky e4e71fd8ba MFB: Fixed bug #1713 (possible crash inside tidy_get_error_buffer()). 2004-06-24 14:20:59 +00:00
Stefan Esser 476c9a3b3d Fixed zend_parse_parameters arguments... 2004-06-24 08:49:00 +00:00
Ilia Alshanetsky 81abbc66fc Added missing safe_mode & open_basedir checks. 2004-06-24 00:48:58 +00:00
ca14c9b1af ChangeLog update 2004-06-24 00:32:21 +00:00
Sara Golemon 56b153390b BugFix #28879 Inconsistent behavior between explicit and implicit array creation.
Changes:

Throw E_WARNING "Illegal offset type" when explicitly creating
array elements with objects, arrays, or resorces as indexes.
This matches implicit creation w/ obj/arr indices.

Throw E_WARNING "Resource ID#%ld used as offset, casting to integer (%ld)"
when implicitly creating array with resource as index. (BC)
2004-06-23 23:20:44 +00:00
George Schlossnagle 9e187415f9 fix for inheritability 2004-06-23 18:06:00 +00:00
Georg Richter f063bdec06 added php_mysqli_construct_get to support __construct in extended classes 2004-06-23 16:47:25 +00:00
Ard Biesheuvel dc701bfdab Changed name to all caps 2004-06-23 13:42:06 +00:00
Ard Biesheuvel 391cbac1f2 Return all results as strings until I can convince the other guys that
it should be otherwise
2004-06-23 13:26:09 +00:00
Ard Biesheuvel 18cd69ef74 Fixed some int-long issues 2004-06-23 13:20:54 +00:00
Uwe Schindler 8327d4e2bd Addendum to bug #28878: change ini keys as PHP_INI_SYSTEM
Also: Adding "bucket" parameter to non-ini-keys, Elemination of double CONTENT_TYPE/_LENGTH environment variables
2004-06-23 13:02:01 +00:00
Dmitry Stogov 2b216967f2 Added SOAP configuration directives 2004-06-23 08:18:42 +00:00
d632106e6e ChangeLog update 2004-06-23 00:32:34 +00:00
Andrei Zmievski 279770743f MFB (better error checking in pcre_fullinfo() calls). 2004-06-22 22:21:58 +00:00
Ilia Alshanetsky 869a90f015 Fixed possible buffer overflow. 2004-06-22 20:27:46 +00:00
Alex Leigh ef81373201 Updated the author's contact information. 2004-06-22 18:08:03 +00:00
Uwe Schindler e276023d82 Fix bug #28878: php.ini values in php5_execute 2004-06-22 15:37:40 +00:00
Dmitry Stogov 4ea8f4b9f2 BUGFIX: Segfault if server's URL has no path. ("http://192.168.8.1:180") 2004-06-22 12:42:17 +00:00
c055a54343 ChangeLog update 2004-06-22 00:32:17 +00:00
Ilia Alshanetsky a3bd8bcd7b Added missing safe_mode check. 2004-06-21 22:53:52 +00:00
Sara Golemon 8f2686df35 BFN 2004-06-21 21:09:13 +00:00
Sara Golemon a2c24ae90e BugFix#28868 (Part Two): This fixes thread unsafety in the userspace
filters which relates to the fix just applied for userspace wrappers.
2004-06-21 21:08:05 +00:00
Marcus Boerger dc66fb1f10 Fixed bug #28822: ArrayObject::offsetExists() works inverted 2004-06-21 19:15:27 +00:00
Sara Golemon 7fcfa8865e BugFix#28868: Wrapper hash not thread-safe.
Userdefined wrappers were being registered into a global wrapper hash
which can cross threads.  Termination of once instance then has the
potential to leave an active stream in another instance with no wrapper
leading to segfault.
2004-06-21 18:58:55 +00:00
Dmitry Stogov d9226a1dd0 Support for HTTP redirection. 2004-06-21 12:56:33 +00:00
Tomas V.V.Cox 1fb65c4c29 More output magic on nested exceptions 2004-06-21 04:36:17 +00:00
Tomas V.V.Cox 24ec6e5a5c Be more consistent with CS 2004-06-21 04:06:18 +00:00
Tomas V.V.Cox 8957eac122 Some API changes:
- addObserver() params order switched
- signal() -> _signal()
- public:getCauseMessage() -> private:_getCauseMessage()
- some more docs
2004-06-21 03:53:39 +00:00
907bdcbc7e ChangeLog update 2004-06-21 00:32:07 +00:00
Ilia Alshanetsky a99e4b5969 Removed unneeded checks around Zend allocation macros. 2004-06-20 21:40:43 +00:00
Tomas V.V.Cox d3de81fb00 First release of the PEAR_Exception class
(dedicated to otherbird)
2004-06-20 19:08:37 +00:00
Marcus Boerger 3df3aedbe0 BFN 2004-06-20 16:49:49 +00:00
Marcus Boerger de8b457181 Fix 2nd issue of bug #28831 2004-06-20 16:46:27 +00:00
Marcus Boerger 9219b746bb BFN 2004-06-20 09:39:09 +00:00
Marcus Boerger 43b4b086db Bugfix #28851: call_user_func_array has typo in error message 2004-06-20 09:37:35 +00:00
0e6607aa51 ChangeLog update 2004-06-20 00:32:22 +00:00
Jan Lehnardt 536e7448f6 - do it right (phpize path issue) 2004-06-19 20:32:07 +00:00
Jan Lehnardt f4f844af19 - phpize now can handle directories with spaces in their name (#28847) 2004-06-19 19:39:56 +00:00
Sebastian Bergmann f0903895c1 Reflection_* -> Reflection*. Patch by Timm Friebe. 2004-06-19 16:52:04 +00:00
8586e6505f ChangeLog update 2004-06-19 00:32:22 +00:00
Sara Golemon 2f7c5d30b5 Another typo in converting array index doubles to long. 2004-06-18 18:33:46 +00:00
George Schlossnagle 6cc2073d91 tests for the crash in bug 28213 2004-06-18 18:10:52 +00:00
George Schlossnagle 6d182a8456 fix for 28213.
class_name and call_type should be reinitialized on every loop iter.
2004-06-18 17:34:58 +00:00
Martin Jansen 6910e6432a * Replaced the nonexistent word "postfix" with "suffix". 2004-06-18 14:41:01 +00:00
Sara Golemon 851b6d4475 String lengths should never be char pointers. 2004-06-18 00:44:37 +00:00
Ilia Alshanetsky 0c72b185fd Fixed possible memory leak. 2004-06-18 00:44:35 +00:00
Ilia Alshanetsky cfbf5b24b7 Fixed bug #28818 (Apache 2 sapis do not export st_dev). 2004-06-18 00:36:58 +00:00
cf8a8a3189 ChangeLog update 2004-06-18 00:32:27 +00:00
Sara Golemon 96a8b63865 String length in parse_parameters should be int 2004-06-17 18:23:47 +00:00
ad2651a74a ChangeLog update 2004-06-17 00:32:34 +00:00
Ilia Alshanetsky 23d71171cf Properly handly high ascii values in soundex(). 2004-06-17 00:17:49 +00:00
Ard Biesheuvel 5232a5afea 64-bit bugsquash party 2004-06-16 23:57:25 +00:00
Stig Bakken 6527a454c6 * don't register object on destructors list if it does not define its
own emulated destructor
2004-06-16 16:26:12 +00:00
c9908cf81d ChangeLog update 2004-06-16 00:32:45 +00:00
Stefan Esser 585628ba67 Fixed: made 3rd parameter to strrpos 64bit safe. 2004-06-15 22:38:18 +00:00
Marcus Boerger 47c72816d3 BFN 2004-06-15 20:40:58 +00:00
Marcus Boerger 4fec06587b #28789: ReflectionProperty getValue() fails on public static members 2004-06-15 20:39:49 +00:00
Pierre Joye 0f5e09c192 - Fix #1602 (reported by Cox)
Do not display var=value using config-get (easy scripting)
2004-06-15 16:48:49 +00:00
Pierre Joye 98e59d58ba - Fix licence (#1645)
- update my status there, reflecting the fact for the past 11 months
2004-06-15 16:33:46 +00:00
Ard Biesheuvel 350e5aa862 Refactored statement allocation
Added emulated support for named input parameters
2004-06-15 14:16:22 +00:00
Rob Richards 196506caa1 BFN 2004-06-15 11:51:09 +00:00
Rob Richards 7c7c353b1e Fixed bug #28771 (Segfault when using xslt and clone)
Add test case for bug #28721
2004-06-15 11:50:56 +00:00
Ard Biesheuvel f91395898c Un-revert param index fix 2004-06-15 10:22:21 +00:00
Ard Biesheuvel e48d127244 Revert (at Wez's request) 2004-06-15 10:06:41 +00:00
313c153274 ChangeLog update 2004-06-15 00:32:13 +00:00
Antony Dovgal 0a896dd987 add tests 2004-06-14 20:10:27 +00:00
Antony Dovgal 73060a89ee fix config.m4
add fold markers
2004-06-14 19:58:35 +00:00
Marcus Boerger afc5a6145c Need {} here 2004-06-14 19:09:42 +00:00
Ard Biesheuvel 2cc63714a0 Added support for fetching and binding to blob fields 2004-06-14 10:56:49 +00:00
533cdf740f ChangeLog update 2004-06-14 00:32:15 +00:00
Ard Biesheuvel 2b21476207 Release isc statement handle when dtor is called
Don't separate() bound zvals
2004-06-13 23:24:31 +00:00
Ard Biesheuvel 1d7a4ed492 Report param binding error 2004-06-13 22:09:54 +00:00
Ilia Alshanetsky d26ddca966 Standardize error reporting. 2004-06-13 17:04:36 +00:00
Pierre Joye 495925381e - Typo (#1627) (cox) 2004-06-13 14:06:01 +00:00
Ard Biesheuvel cb4612c735 Added double param type 2004-06-13 10:35:01 +00:00
Rob Richards ac772dcf53 BFN 2004-06-13 10:13:12 +00:00
Rob Richards e73d498947 Fix bug #28721 (appendChild() and insertBefore() unset DOMText) 2004-06-13 10:12:47 +00:00
7fefbbb177 ChangeLog update 2004-06-13 00:32:14 +00:00
Ard Biesheuvel e1519d6f17 GCC fixes 2004-06-12 22:17:16 +00:00
Ard Biesheuvel c84c5640e7 Revert 2004-06-12 20:52:07 +00:00
Ard Biesheuvel 6b3cda310a Added client/server info attributes 2004-06-12 18:56:07 +00:00
Ard Biesheuvel 8a3975191e Hope I finally got it right this time 2004-06-12 18:42:13 +00:00
Ard Biesheuvel a312bb5ee3 Folding markers 2004-06-12 17:09:33 +00:00
Ard Biesheuvel ad568aab6f Improved error handling
Added some comments
2004-06-12 16:58:20 +00:00
Ard Biesheuvel c8c0ddb73d Removed dependency on regular interbase extension
Added support for all datatypes except BLOBs
2004-06-12 16:07:52 +00:00
Ard Biesheuvel 1fb48b5091 Removed dependency on regular interbase extension 2004-06-12 16:05:49 +00:00
Ard Biesheuvel 216c8ffdcd Use snaps. LIB path 2004-06-12 14:59:45 +00:00
Ard Biesheuvel 15fa07f0f6 Changed LIB path 2004-06-12 10:23:31 +00:00
Greg Beaver 22fa023c88 fix bug #1610: pear package doesn't validate deps
It was never validating deps at all!
2004-06-12 06:15:55 +00:00
Greg Beaver 9873fa5e42 fix bug #1615: installer must create extension dir if it doesn't exist, patch by Tomas 2004-06-12 05:48:10 +00:00
Greg Beaver 37b73ad2d4 fix bug #1617, exception never returned from PEAR_ErrorStack->push() 2004-06-12 05:36:40 +00:00
Ard Biesheuvel c29704e066 New test 2004-06-12 03:11:16 +00:00
Ard Biesheuvel 493b89c3b1 Nearly complete implementation
No date/time fields yet ...
2004-06-12 03:09:48 +00:00
Ard Biesheuvel 39a690321a Added export macros 2004-06-12 02:49:47 +00:00
Ard Biesheuvel 50ac5db2b4 Added double param type
Added param struct initialiser
Reversed param parsing order (long <=> string)
2004-06-12 02:35:34 +00:00
Ard Biesheuvel 1e3854597c Initial revision (incomplete) 2004-06-11 01:37:06 +00:00
d0c4b3d3ec ChangeLog update 2004-06-11 00:34:13 +00:00
Ilia Alshanetsky b9fc9a6ad1 hypot() is not experimental. 2004-06-10 19:38:24 +00:00
Ilia Alshanetsky af5501027f Fixed bug #28723 (Fixed mbstring config.m4 to work on OSes where test
command does not support -e parameter).
2004-06-10 14:06:17 +00:00
Marcus Boerger 7318238236 Changed that a bit 2004-06-10 13:39:30 +00:00
Marcus Boerger 4da11644de - Require a single white-space char after /** to start a doc comment that
way we prevent /*** from becoming a doc comment (as requested Derick).
2004-06-10 13:38:31 +00:00
Marcus Boerger c756609658 Add missing declaration 2004-06-10 12:32:09 +00:00
Marcus Boerger eb0cb6f6ed Small code layout change 2004-06-10 12:11:16 +00:00
Marcus Boerger 2784cf206d BFN 2004-06-10 11:57:04 +00:00
Marcus Boerger eefdd0ea49 Do not require NEWLINE at start of doccomment 2004-06-10 11:40:34 +00:00
Marcus Boerger 17a363a8f8 BFN 2004-06-10 11:29:15 +00:00
Marcus Boerger e8e4ff0aa1 Bugfix #28699: Reflection api bugs 2004-06-10 11:28:29 +00:00
Dmitry Stogov 0282ad792a Fixed bug #28702 (SOAP does not parse WSDL service address correctly). 2004-06-10 09:07:09 +00:00
622f7679f7 ChangeLog update 2004-06-10 00:32:42 +00:00
Frank M. Kromann 36702d5f41 Allow compilation on Win32.
Need to implement a few Windows specific functions.
2004-06-09 19:27:36 +00:00
Marcus Boerger bd05792560 BFN 2004-06-09 19:26:55 +00:00
Marcus Boerger 4213153365 Fix Bug #28694 ReflectionExtension::getFunctions() crashes PHP 2004-06-09 19:25:42 +00:00
Ilia Alshanetsky f0ffe7c85b Fixed bug #28175 (Allow bundled GD to compile against freetype 2.1.2). 2004-06-09 14:50:05 +00:00
Ilia Alshanetsky 3e638c84c0 Fixed bug #28525 (gmp_powm() does not work with hexadecimal string modulo
represented as a string).
Patch by: pickett at sumu dot org
2004-06-09 14:39:33 +00:00
Ilia Alshanetsky ccc580f408 Fixed memory leak on error in win32's opendir() emulation. (Patch by Wez) 2004-06-09 14:18:14 +00:00
1f73efcaab ChangeLog update 2004-06-09 00:32:35 +00:00
Ard Biesheuvel 4713ce294d Interbase news 2004-06-08 20:25:49 +00:00
Greg Beaver 1f20b7a626 partial fix, bug #1163: rpm build doesn't build properly 2004-06-08 18:26:20 +00:00
Greg Beaver d14e259823 fix bug #1550: Builder does not set path to match bin_dir 2004-06-08 18:15:11 +00:00
Greg Beaver 29a09f984c fix bug #1378: user/pass must be urldecoded from parse_url in Remote.php 2004-06-08 18:03:46 +00:00
Greg Beaver 628e5530b9 fix bug #1153: PEAR command doesn't work after upgrading
reverting earlier fix - people must have register_argc_argv=on set in php.ini for PEAR to work.
2004-06-08 17:56:22 +00:00
Greg Beaver b175cdfd71 fix bug #1581: unhelpful error message if "pear blatch" is typed 2004-06-08 17:49:19 +00:00
Ilia Alshanetsky 49fb6260b6 Fixed bug #1580 (Tidy configuration settings leak memory). 2004-06-08 14:55:14 +00:00
Ilia Alshanetsky b8c9e83664 Fixed bug #28692 (\0 in Authenticate header passed via safe_mode). 2004-06-08 13:23:38 +00:00
Ard Biesheuvel 4ea43fe019 ... back from the dead 2004-06-08 10:04:09 +00:00
Georg Richter 202d2990a9 fixed crash (changed MYSQL TO MY_MYSQL in mysql_stmt_init) 2004-06-08 06:20:58 +00:00
3fc91aff97 ChangeLog update 2004-06-08 00:32:15 +00:00
Andi Gutmans 0bdbbd379e - Go back to -dev (Shouldn't need another RC) 2004-06-07 18:57:34 +00:00
Ilia Alshanetsky ceb70dbc68 Fixed bug #28668 (glob() does not work with relative paths on Windows). 2004-06-07 18:30:16 +00:00
Frank M. Kromann f05924db37 Fix build on win32 2004-06-07 18:03:51 +00:00
Andi Gutmans 6f47156228 - Roll RC3 2004-06-07 14:23:45 +00:00
Ilia Alshanetsky ff5b2d27ae Fixed bug #28670 (WWW-Authentication header mangling with PCRE in safe_mode
adds extra spaces).
2004-06-07 13:51:50 +00:00
Georg Richter 1b40042b35 forgot to remove Win32 restrictions for mysql methods 2004-06-07 08:34:52 +00:00
Derick Rethans bcca5b8cb5 - Reorder (again :) 2004-06-07 07:05:33 +00:00
Sara Golemon 3838fb99de MFB: Missing length limit parameter. 2004-06-07 05:00:37 +00:00
1b80f44cf1 ChangeLog update 2004-06-07 00:32:20 +00:00
Pierre Joye d7e86a5669 - No more Pager 2004-06-06 22:49:46 +00:00
Pierre Joye 8217b64a33 - Update for 5.0RC3 2004-06-06 22:49:10 +00:00
Ilia Alshanetsky 9c1e668593 Fixed bug #28649 (Proper glob() return value on Linux when there are no
matches).
2004-06-06 16:21:11 +00:00
Greg Beaver b4ae74ae2c update unit tests for PEAR 1.4.0dev6, using new getDownloadURL() xml-rpc call 2004-06-06 16:05:30 +00:00
Greg Beaver 9304645cf3 add missing $tmp to PEAR::isError() 2004-06-06 15:52:41 +00:00
Greg Beaver 84d9651b61 eliminate the annoyance of upgrading from crapster versions of PEAR once and for all.
Now, if getopt2 exists, it is used, otherwise getopt is used.
2004-06-06 15:04:16 +00:00
Georg Richter f0468116c0 removed conditional defines for load_data_infile_handlers on windows
(4.1.2 windows build is fixed now on mysql.com)
2004-06-06 08:52:19 +00:00
Stefan Esser fb5cb59035 Fixed Zend Function Destructor to use correct TSRM handle. 2004-06-06 08:37:12 +00:00
Sebastian Bergmann 14deb9dd04 ZTS fixes. 2004-06-06 06:40:19 +00:00
ff5fca9aa0 ChangeLog update 2004-06-06 00:33:20 +00:00
Georg Richter 216eb9f82b added mysqli changes 2004-06-05 18:43:31 +00:00
Georg Richter 93bf6517df Major changes for 4.1.2-alpha/4.1.3-beta:
- added container for mysql structure
- added load data infile callback functions (currently disabled under win)
Bug fixes:
- fixed property changes (4.1.1 -> 4.1.2)
- fixed memleak in mysqli_connect
- fixed bug #28100
- fixed bug #28205
- fixed bug #28430
2004-06-05 18:31:56 +00:00
Marcus Boerger 120625548d BFN 2004-06-05 14:59:32 +00:00
Marcus Boerger a6276a2414 Fix #28641: Instance of Interface 2004-06-05 14:59:21 +00:00
Ard Biesheuvel 9579de34d7 Added support for date/time types
Added support for compiling/executing PHP code stored in the database
Added support for TSRM
2004-06-05 10:03:42 +00:00
85c9a200fa ChangeLog update 2004-06-05 00:32:05 +00:00
Ard Biesheuvel 2c97bc2632 Fixed unregistered bug [crash in http_build_query()] 2004-06-04 16:54:14 +00:00
Ilia Alshanetsky f9cec029c8 Fixed bug #28632 (Prevent open_basedir bypass in MySQL's LOAD DATA LOCAL). 2004-06-04 15:26:54 +00:00
Ard Biesheuvel a37ffd814d Added support for scaled integers 2004-06-04 14:26:33 +00:00
Ilia Alshanetsky 0e443166e0 Fixed bug #28627 (When multiple MySQL links are used default link is
leaked).
Patch by: gavin at ipalsoftware dot com
2004-06-04 13:49:31 +00:00
Ard Biesheuvel f1a4a14ccb Added support for arbitrary input types
Added support for NULL input/output values
2004-06-04 13:33:56 +00:00
Sara Golemon ceb73ca019 MFB BugFix# 28626 You can't #ifdef check a typedef. Just give it another name since it's only used once anyway. 2004-06-04 01:03:38 +00:00
89ee6b45ad ChangeLog update 2004-06-04 00:34:01 +00:00
Ard Biesheuvel f4777d14e3 Let DB handle type coercion instead of PHP 2004-06-03 23:18:36 +00:00
Ard Biesheuvel 0223de2c39 Added support for other return types besides VARCHAR 2004-06-03 15:31:17 +00:00
Ard Biesheuvel 38030dac08 Fixed blob ID format 2004-06-03 12:00:23 +00:00
Ard Biesheuvel 5be358667b news 2004-06-03 10:55:27 +00:00
Andi Gutmans 02032ccf9f - Prepare for RC3RC2 2004-06-03 08:17:15 +00:00
40b17e6c5c ChangeLog update 2004-06-03 03:03:17 +00:00
Ard Biesheuvel bf4af0f4ca Ton of fixes 2004-06-02 21:43:31 +00:00
Ard Biesheuvel 86aecbbe31 Initial revision of PHP/Interbase UDF lib
# This will allow users running the embedded engine
# to call PHP functions from inside their SQL statements
2004-06-02 21:15:27 +00:00
Andi Gutmans f7ca8821b2 - Don't use ZEND_MM in Windows 2004-06-02 15:05:10 +00:00
Stanislav Malyshev 176f6d8e6e fix incdec - make value's refcount non-zero when passing to
write_property - otherwise __set caller cleanup could kill it.
2004-06-02 12:48:19 +00:00
c59be44de1 ChangeLog update 2004-06-02 00:32:03 +00:00
Ard Biesheuvel 39edbe5192 Don't be too strict if the number of binding arguments provided exceeds the expected number 2004-06-01 23:31:43 +00:00
Ilia Alshanetsky 6b35037ca2 No need to NULL terminate manually, snprintf() does it for us already. 2004-06-01 21:04:33 +00:00
Ilia Alshanetsky 98a6986d97 Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
200-210 range).
Patch by: fernando dot nemec at folha dot com dot br
2004-06-01 20:16:06 +00:00
Ilia Alshanetsky db9f1fafa5 Fixed leak inside MINFO function.
Fixed crash inside enchant_dict_suggest() when there are no suggestions.
Added missing safe_mode/open_basedir check inside
enchant_broker_request_pwl_dict().
Fixed various function prototypes.
2004-06-01 18:59:49 +00:00
Ard Biesheuvel b027552ca3 Removed debugging code 2004-06-01 17:14:47 +00:00
Greg Beaver 5b565c1eb1 update dependency to PEAR 1.4.0dev5 2004-06-01 14:51:49 +00:00
Greg Beaver 27a4b575e8 test files for PEAR are now installable! 2004-06-01 14:29:59 +00:00
Greg Beaver cb0b01f7c2 file needed for registry test 2004-06-01 14:27:54 +00:00
Greg Beaver a0ebaab052 add needed package.xml files for channel tests 2004-06-01 14:15:41 +00:00
Greg Beaver e78e1dd5e8 update to include all new unit tests and files 2004-06-01 13:55:49 +00:00
Greg Beaver 58483c8776 begin work on making the tests installable 2004-06-01 13:45:55 +00:00
Greg Beaver 472de86f8d prepare for actual installable unit tests 2004-06-01 13:22:28 +00:00
Greg Beaver 86953ab0f5 fix unit tests for 1.4.0dev4 2004-06-01 13:11:15 +00:00
Derick Rethans 0ede231c76 - Reorder 2004-06-01 11:54:00 +00:00
Andi Gutmans 6f34d891f5 - NEWS 2004-06-01 11:47:14 +00:00
Andi Gutmans 2e19f82a7f - If user error handler returns "false" then we relay to the built in error
handler
2004-06-01 11:45:46 +00:00
Ard Biesheuvel ff3a363d7a Use constant IBASE_CREATE instead of just 0 2004-06-01 08:38:33 +00:00
Ard Biesheuvel 302fd9a77f Woops, missed one 2004-06-01 00:50:05 +00:00
Ard Biesheuvel 5a8a9a59e2 Fixed bug #28569 (connection id is not thread safe) 2004-06-01 00:44:20 +00:00
95910aa26c ChangeLog update 2004-06-01 00:32:37 +00:00
Marcus Boerger 9b8eee74d9 Refcount must not be set separatley again. 2004-05-31 21:49:52 +00:00
Marcus Boerger 20b60f49d9 Add missing initialization 2004-05-31 21:46:00 +00:00
Marcus Boerger 21315c08b7 Add missing initialization 2004-05-31 21:43:43 +00:00
Marcus Boerger 374ac86e33 #28589: Segfault in Reflection API 2004-05-31 21:38:01 +00:00
Pierre Joye f6354c3a1a MFB: missing ';' 2004-05-31 21:04:21 +00:00
Ilia Alshanetsky 9e970ef9a8 Added missing argument check. 2004-05-31 21:01:29 +00:00
Ilia Alshanetsky 22dfb88bf1 Fix build. 2004-05-31 20:25:37 +00:00
Ard Biesheuvel 3be22062fa Fix typo in error message 2004-05-31 13:43:06 +00:00
Ard Biesheuvel e9125d6338 Improved handling of 'CREATE DATABASE ...' by ibase_query()
Improved param handling of ibase_query() and ibase_execute()
2004-05-31 13:40:25 +00:00
Rob Richards 5b0f34ae80 Fix bug #28584: DOMText::splitText() does not split text properly (benjcarson)
Prototype fixes
2004-05-31 12:50:28 +00:00
Zeev Suraski 7d04465b74 Fix prototypes 2004-05-31 12:27:49 +00:00
Rob Richards 1d82c42493 fix leak when using relaxng
interim fix for isolating our streams handling
- once libxml supports overriding streams this should be changed
  for security reasons
2004-05-31 11:20:46 +00:00
Zeev Suraski 846c5a252e Fix typo 2004-05-31 08:58:32 +00:00
468ae7b88a ChangeLog update 2004-05-31 00:33:13 +00:00
Brad House cae0fd23f0 Update the mcve module for libmonetra 4.0
A compatability layer has been introduced which should mean all
scripts written for v 3.2 of the module should continue working,
as well as compilation should still work against libmcve 3.2.x.
This module eventually needs to be renamed to 'monetra' to reflect
the naming change of the underlying library.
2004-05-30 22:41:24 +00:00
Ard Biesheuvel fda04a0ed3 Restrict 'CREATE DATABASE' in sql safe mode 2004-05-30 20:40:36 +00:00
Ard Biesheuvel 17da85ba9b Fix Win32 build
Added missing 'break'
2004-05-30 20:24:46 +00:00
Ilia Alshanetsky 4a7962b31f Fixed memory leak on ifx_error(). 2004-05-30 18:58:47 +00:00
Ilia Alshanetsky 33d72ede4e Fixed bug #28564 (Problem building informix as a shared extension).
Patch by: roques at mti dot ag
2004-05-30 17:56:52 +00:00
Zeev Suraski a2ea2d7173 Fix prototypes 2004-05-30 17:53:12 +00:00
Ard Biesheuvel 18fa78842d Fix unregistered bug (segfault on uninitialised pointer)
Return string("0 ") from ibase_query() if query succeeded but did not affect any rows
2004-05-30 17:51:19 +00:00
Zeev Suraski e54165e406 No meaning for unsigned 2004-05-30 17:34:11 +00:00
Zeev Suraski e11b518c95 Fix prototype 2004-05-30 17:32:32 +00:00
Greg Beaver 2e7e8f30fc fix unit tests for 1.4.0dev3 2004-05-30 17:02:34 +00:00
Ard Biesheuvel f7ce70672c Use default character set in generated test DB 2004-05-30 16:59:43 +00:00
Ard Biesheuvel bd2ddd9fae Fix HTML/table layout in info() entry 2004-05-30 16:41:28 +00:00
Ard Biesheuvel 56ca01da1f Removed ibase_timefmt() - use ini_set() instead
Improved phpinfo() appearance
2004-05-30 16:20:25 +00:00
Zeev Suraski 8b861ec798 Update to PHP-style prototypes
(a PHP function returning char *?  What were you smoking? :)
2004-05-30 15:12:08 +00:00
Brad House 43db887482 manually check for egrep 2004-05-30 14:33:45 +00:00
39729083ee ChangeLog update 2004-05-30 00:32:48 +00:00
Wez Furlong bd818c0118 Turn this off then 2004-05-29 09:27:18 +00:00
Greg Beaver a865b5d0c7 testing file 2004-05-29 09:21:31 +00:00
Greg Beaver 09ee88f9bf modify php_dump.php, .cvsignore ignores *.php
move include to the place where it is used
2004-05-29 09:09:46 +00:00
Greg Beaver 71e0c354ff update _installFile() test for channels 2004-05-29 09:06:09 +00:00
Greg Beaver 32fd0f3ffa update checkDeps/extractDownloadFilename tests for channels 2004-05-29 09:03:43 +00:00
Greg Beaver 478aff5c22 update registry test for channels 2004-05-29 09:02:47 +00:00
Greg Beaver 73124c04be use fake pearweb - now anyone can run the download unit tests.
These tests require channels to pass
2004-05-29 09:02:26 +00:00
Greg Beaver d4070174d8 fake pearweb package files, for unit testing downloads without an installed pearweb 2004-05-29 09:00:52 +00:00
Greg Beaver d87e221f44 config unit tests, ready for channels 2004-05-29 08:59:26 +00:00
Greg Beaver 918d45198a new unit tests
pearweb mock object is complete
2004-05-29 08:51:59 +00:00
Greg Beaver 8c5c17c3a1 update for conflicting file test 2004-05-29 08:49:01 +00:00
Greg Beaver 1f31e7ddea new package.xml needed to test conflicting files error 2004-05-29 08:48:01 +00:00
ba2b5623c3 ChangeLog update 2004-05-29 00:32:22 +00:00
Wez Furlong 7171429f21 Don't rely on TIOCNOTTY. 2004-05-29 00:30:11 +00:00
Ard Biesheuvel 5f53ee1537 Changed default date format to ISO
Enable sync flag in connect()
2004-05-28 23:39:33 +00:00
John Coggeshall 6b02a01c20 'tidy' should not be final, but 'tidyNode' should be. 2004-05-28 20:32:52 +00:00
Ard Biesheuvel 850c6a27f6 Fix commit/rollback of multi-link transactions
Some CS
2004-05-28 20:11:34 +00:00
Andrei Zmievski 915a990330 Allow user-defined error handlers to indicate whether default error
handler should be re-invoked, by returning true or false.
2004-05-28 17:28:33 +00:00
Ilia Alshanetsky 6544f8d47e Fixed memory leak on error. 2004-05-28 14:17:46 +00:00
Ilia Alshanetsky e389e255e6 The engine will take care out-of-memory situation for us. 2004-05-28 14:14:26 +00:00
Stefan Esser 23813d603c Fixed off-by-one in http_fopen_wrapper 2004-05-28 13:38:06 +00:00
Wez Furlong 54bbe548fe Hopefully resolve proc_open build issues.
If we need anything more elaborate than this, then we can move to a configure
time check as Sascha suggests.
2004-05-28 13:25:51 +00:00
Christian Stocker c59471cd1f fix memleak in php callbacks 2004-05-28 13:04:19 +00:00
Stefan Esser 2e3b9ec278 Fixed off-by-one in php_parse_url. 2004-05-28 11:33:23 +00:00
Derick Rethans 27344aaed6 - Added date/time parser thingy. 2004-05-28 10:47:15 +00:00
Derick Rethans f964cc09d2 - Fixed ip2long() behavior if an invalid IP address was passed to the
function. This makes it possible to distingiush between "255.255.255.255"
  and a wrong one.
2004-05-28 10:45:18 +00:00
Marcus Boerger 9797f49466 Add more outstanding patches 2004-05-28 09:14:44 +00:00
Marcus Boerger 0aceba0a8d Remove finished tasks 2004-05-28 09:12:07 +00:00
Marcus Boerger a8ced60e04 Remove finished tasks 2004-05-28 09:06:56 +00:00
Marcus Boerger 9d76829963 Add more things 2004-05-28 09:03:00 +00:00
Marcus Boerger 0ef420a71e Prevent possible problems with illegal properties 2004-05-28 08:55:10 +00:00
Derick Rethans 877ecb3c81 - Make the default mask for user defined error handlers include ALL errors,
including E_STRICT.
2004-05-28 08:08:56 +00:00
7489718769 ChangeLog update 2004-05-28 00:31:45 +00:00
Ilia Alshanetsky df71910d0e Better skip condition check for session tests. 2004-05-27 20:53:26 +00:00
Andrei Zmievski 844e7eb945 5.1 tasks. 2004-05-27 16:22:47 +00:00
Andi Gutmans e51105c6a6 - Back to RC3-dev until we roll final 2004-05-27 15:03:46 +00:00
Wez Furlong b369925372 Fix #25939 for good this time.
# How could I miss this??
2004-05-27 13:04:14 +00:00
Derick Rethans ab34eb7330 Put similar items next to eachother 2004-05-27 12:28:41 +00:00
Andi Gutmans d470f93506 - More news 2004-05-27 12:01:14 +00:00
Andi Gutmans bca3e30484 - Fix problem with exceptions returning from include(). (Dmitry) 2004-05-27 11:59:58 +00:00
Andi Gutmans 5a9d648f1f - RC3RC1 2004-05-27 11:39:35 +00:00
Rob Richards edae935c26 namespace/tagname validation fixes (Adam Trachtenberg)
added new test
2004-05-27 11:15:45 +00:00
Andi Gutmans 7f887852a6 - NEWS 2004-05-27 08:30:14 +00:00
Dmitry Stogov 99a0504a6b Memory leaks were fixed 2004-05-27 08:19:29 +00:00
Dmitry Stogov 2b3e184245 BUGFIX: Prevent crash on error in send_http_soap_request() 2004-05-27 07:58:22 +00:00
e3e7ef94a5 ChangeLog update 2004-05-27 00:32:10 +00:00
Wez Furlong 6f5c0992a3 Fix leak on systems where alloca isn't really alloca. 2004-05-26 22:19:44 +00:00
Wez Furlong dd9ac710f1 Fix silly mistake.
Thanks Antony :)
2004-05-26 21:19:21 +00:00
Andrei Zmievski 81efd46186 Avoid unnecessary and silly copying of constant name when registering. 2004-05-26 21:01:37 +00:00
Andi Gutmans 97dee3a8c2 - Fix memory manager problem 2004-05-26 20:55:16 +00:00
Ilia Alshanetsky b59d5af951 Prepare for 0.2 release. 2004-05-26 20:25:58 +00:00
Ilia Alshanetsky 190227899a Turn off session.auto_start to prevent test failures. 2004-05-26 18:23:21 +00:00
Ilia Alshanetsky de58df089f Prevent test failure when fi_FI locale is not available. 2004-05-26 18:18:14 +00:00
Pierre Joye 07e4ab6946 - Remove this test, it still segfaults anyway (less noise in tests :) )
Already removed in PHP_4_3 branch
2004-05-26 18:12:43 +00:00
Andi Gutmans b5daf7078e - Use FREE_HASHTABLE instead of efree() 2004-05-26 18:00:27 +00:00
Edin Kadribasic 9cc4fb18b6 PQfreemem() is only available in 7.4 2004-05-26 17:45:03 +00:00
Wez Furlong 429bce6519 Apparently it is better to specify 500 here for unix98 bits and pieces. 2004-05-26 14:55:32 +00:00
Wez Furlong 6ef90672d8 Fix build... 2004-05-26 10:11:20 +00:00
Sebastian Bergmann 2fbfcd7482 Update Reflection API class names. Whitespace fixes. 2004-05-26 07:00:39 +00:00
Derick Rethans 17df3ec21b - Fixed bug #28523 (Typo in ext/sockets/sockets.c) 2004-05-26 06:53:04 +00:00
c50a4252cd ChangeLog update 2004-05-26 00:33:37 +00:00
Stefan Esser 7dc95709c8 break is better 2004-05-25 22:12:40 +00:00
Wez Furlong 2e73bbfdc1 Allow use of scrollable cursor for ODBC 2004-05-25 18:57:50 +00:00
Wez Furlong 70bd032076 Use the correct label for the error message 2004-05-25 18:34:46 +00:00
Wez Furlong d13d9c6047 Allow setting the cursor name for ODBC statements, so that:
UPDATE foo set .... WHERE CURRENT OF <NAME>

statements will work.
2004-05-25 18:33:51 +00:00
Wez Furlong d2a8d5a80f get/set attributes for statements 2004-05-25 18:32:48 +00:00
Wez Furlong 4d232fb17c Add flag to control the use of the ODBC cursor emulation library.
The default (which should be safe) is to use the cursor library if it is needed.
If for some reason either the driver or the emulation is broken, you may
override this from your script.
2004-05-25 17:44:36 +00:00
Wez Furlong 7a87af3321 Some definitions for cursors.
Define a mechanism for driver-specific attributes.
Use a refcount for the stmt structure.
2004-05-25 17:43:24 +00:00
Edin Kadribasic c7a2cf7385 Whitespace: editor in the wrong mode ;) 2004-05-25 17:38:58 +00:00
Edin Kadribasic 16a53a00ea Add transaction support 2004-05-25 17:36:22 +00:00
Brad House 7f44f8ee94 PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD
requires AC_PROG_EGREP when you phpize
2004-05-25 17:08:42 +00:00
Ilia Alshanetsky cf75eb8a6f Cleanup. 2004-05-25 16:49:32 +00:00
Ilia Alshanetsky 402de24fc4 One more leak down. 2004-05-25 16:40:54 +00:00
Ilia Alshanetsky b7ecaca17f More leak fixes. 2004-05-25 16:38:28 +00:00
Edin Kadribasic ff1cbb8460 Use binary safe function for quoting 2004-05-25 16:24:29 +00:00
Antony Dovgal 737bc357cb fix couple of memory leaks 2004-05-25 14:57:56 +00:00
Ilia Alshanetsky 0c762dff03 More possible leak fixes (Thanks Tony). 2004-05-25 14:47:22 +00:00
Ilia Alshanetsky 2685fad6b7 Fixed memory leak. 2004-05-25 14:39:26 +00:00
Ilia Alshanetsky 9280b88a8c One more memory leak. 2004-05-25 14:35:49 +00:00
Ilia Alshanetsky d782abf416 More leak fixes. 2004-05-25 14:30:07 +00:00
Andi Gutmans 2917ff1e7d - Nuke unused decleration 2004-05-25 14:19:19 +00:00
Ilia Alshanetsky ce3891347f Fixed memory leak. 2004-05-25 14:12:15 +00:00
Ilia Alshanetsky 6304e5d7cb Kill unused var. 2004-05-25 13:51:00 +00:00
Wez Furlong 1360e3478c Merge that nicer error message here too 2004-05-25 13:25:22 +00:00
Wez Furlong 6873d6839d *sigh*, obviously, we need this to be able to use sapi_module.name 2004-05-25 13:23:20 +00:00
Wez Furlong ff0ee48537 DEBUG -> PHP_DEBUG 2004-05-25 13:17:01 +00:00
Wez Furlong 7916ef2ee1 Allow sqlite to build as a shared ext under win32 2004-05-25 13:01:05 +00:00
Wez Furlong 146255f35c check if it matches... not if it doesn't... 2004-05-25 13:00:25 +00:00
Wez Furlong c6dff79138 In debug mode, under CLI don't close stderr.
This is so that we can see any error reports.

# for extra paranoia, could limit this check to happen only after the script is
# finished running.
2004-05-25 12:59:15 +00:00
Wez Furlong 32956a25bf add "clean-pecl" rule for nuking pecl objects 2004-05-25 12:57:45 +00:00
Wez Furlong a4f03b8086 Tidy this up a little bit for win32. 2004-05-25 12:44:35 +00:00
Wez Furlong e6551f081d Throw exception during ctor 2004-05-25 12:03:41 +00:00
Andi Gutmans 02884a08f5 - More fixes 2004-05-25 10:09:46 +00:00
Andi Gutmans 6704ab4b35 - Make fix compile. 2004-05-25 09:25:22 +00:00
Andi Gutmans db90fc4c90 - Fix memory leak in mem cache in conjunction with Zend MM. How come no one
- noticed this? :)
2004-05-25 08:33:11 +00:00
1e36c786ae ChangeLog update 2004-05-25 00:32:04 +00:00
Pierre Joye 5b71225f1b - Fix #28506, negative angle returns "random arcs"
while (angle < 0) angle += 2*M_PI is used now
2004-05-24 19:52:28 +00:00
Ilia Alshanetsky 396bf39311 Fixed bug #28508 (Do not make hypot() available if not supported by libc). 2004-05-24 17:02:12 +00:00
Wez Furlong 81b3231b5d Moved pdflib extension to PECL 2004-05-24 16:41:41 +00:00
9926a97e26 ChangeLog update 2004-05-24 00:32:46 +00:00
Andi Gutmans 0b0c5d3fac - Fix problem with object being destroyed more than once 2004-05-23 20:33:09 +00:00
Andi Gutmans ef9878647d - Fix the following script (it crashed):
<?php
   class ErrorHandler {
     function __construct() {
       set_error_handler(array(&$this, 'handle'));
     }

     function __destruct() {
       restore_error_handler();
     }

     function handle($code, $msg, $file, $line, $locals) {
     }
   }

   new ErrorHandler();
?>
2004-05-23 20:27:32 +00:00
Ilia Alshanetsky e4c5e85697 Fixed leaks on fatal errors in tidy. 2004-05-23 17:22:21 +00:00
Andi Gutmans bd892a164b - NEWS 2004-05-23 16:24:21 +00:00
Andi Gutmans c495c54069 - Fix typo although it isn't being built 2004-05-23 16:05:09 +00:00
Andi Gutmans e410a0f5b1 - Fixed bug #27640 memory leak of registered_zend_ini_directives (Dmitry) 2004-05-23 16:02:36 +00:00
Andrey Hristov 4760dd4fc5 adding this 2004-05-23 15:26:55 +00:00
Andrey Hristov 794065776a Ansrei reverted this 2004-05-23 15:21:38 +00:00
Wez Furlong ad99c124c4 Finally a fix for #23220: IIS does not cleanly close SSL connections.
Also enable the safe and recommended bug work around options in the SSL
context.
2004-05-23 10:36:08 +00:00
Stefan Esser bed3f4ce0b This is more correct. 2004-05-23 10:00:59 +00:00
Greg Beaver ad57096a8b Fix #1395: PEAR_ErrorStack::staticCallback needs to instantiate the stack
Fix up default callback, so that it can be set for each package as well as for all packages.

Callbacks now have 3 levels of control, which may be a bit too complex, default callbacks might have to go for debugging reasons.  Either that or some kind of origination information should be appended to the error array describing which callbacks were called, so debugging is at least possible
2004-05-23 06:06:10 +00:00
Greg Beaver 6f7d0b2a6a in preparation for testing all remote functionality, use a mock object for a functioning pearweb server 2004-05-23 05:33:25 +00:00
a4de015ec7 ChangeLog update 2004-05-23 00:33:49 +00:00
Wez Furlong 055848d83a prep for release 2004-05-22 20:58:36 +00:00
Ard Biesheuvel 8b1fca9e3a Use dummy status vector in ibase_connect()
Added fbird_ aliases for all ibase_ functions
# See comment in code for more info
# Please let me know if there are any namespace issues involved
2004-05-22 18:50:58 +00:00
Wez Furlong d39117c234 Fix buglet in dbh closing. 2004-05-22 15:04:26 +00:00
Wez Furlong 35494bb569 Enable ODBC Connection Pooling.
Theoretically better than PHP persistent connections, since ODBC itself takes
care of resetting the connections back to a "ground" state.

Connection pooling defaults to ON, since this is generally useful.
You can turn it off by using:

pdo_odbc.connection_pooling=off

in your php.ini file.

You may configure how ODBC matches connection details to existing connections
by setting this value to "strict" (the default) or "relaxed".  You are
encouraged to read the ODBC specs before changing this value.
2004-05-22 14:51:26 +00:00
Wez Furlong ce5e317cc5 ok MSVC, why didn't you spot *that* one?? 2004-05-22 00:38:11 +00:00
e136b9311c ChangeLog update 2004-05-22 00:32:18 +00:00
Wez Furlong 8d9c384f7f Fix doer()
Implement error handling for ODBC
2004-05-22 00:30:00 +00:00
Ilia Alshanetsky b4ef3d186a Add self to credits. 2004-05-21 22:45:27 +00:00
George Schlossnagle 84cfbe5efe pierre's thingy 2004-05-21 22:36:52 +00:00
George Schlossnagle e872491f80 /me learns to read 2004-05-21 22:30:58 +00:00
George Schlossnagle 88942c9834 both places 2004-05-21 22:27:30 +00:00
George Schlossnagle 553698f35d drop the dev 2004-05-21 22:27:02 +00:00
Wez Furlong 758b7f1ad4 Bump the version number 2004-05-21 22:26:45 +00:00
George Schlossnagle 4d01a5c2d1 ok, apprently we _don't_ want to count the nulls. 2004-05-21 22:24:20 +00:00
George Schlossnagle 1ee89e1bea remove debugging 2004-05-21 22:20:25 +00:00
George Schlossnagle 518cf77f32 fix fubar'd emulated bindings 2004-05-21 22:19:33 +00:00
Wez Furlong dc57cff2a6 Prep for release 2004-05-21 21:20:00 +00:00
Timm Friebe 3a168b52e7 - Fixed expected return value from test #2
Invalid resources yield bool(false) in PHP5, NULL in PHP4
2004-05-21 21:01:21 +00:00
Timm Friebe 342d7b6968 - Removed currently leaking auto-cancel test
- Fixed expected return value from sybase_num_rows() when an
  invalid resource is passed (returns false instead of NULL)
2004-05-21 20:54:39 +00:00
Timm Friebe df5396677d - Fixed expected return value from var_dump()
- Cleaned up SQL statement
# This bug has been fixed, but this test should be kept anyways,
# just to make sure it does not reappear
2004-05-21 20:53:01 +00:00
Timm Friebe 8eac91345b - Fixed bug #28354 2004-05-21 20:29:38 +00:00
Timm Friebe b20be6a27b - Initial release 2004-05-21 19:45:55 +00:00
Edin Kadribasic 640bed4cf5 Prepare release 2004-05-21 19:09:43 +00:00
Wez Furlong 40ab777dc8 Update package/module 2004-05-21 17:33:58 +00:00
Wez Furlong 25049d6cf8 Add some blurb 2004-05-21 17:31:49 +00:00
Wez Furlong 9462eb6db5 Ok, so we do need to rinit here after all. 2004-05-21 17:17:55 +00:00
Wez Furlong fbccd1438c Update to reflect recent changes in dl() 2004-05-21 17:08:36 +00:00
Wez Furlong 597124e128 Update package/module 2004-05-21 16:53:32 +00:00
Wez Furlong 500922f9a2 Update package file 2004-05-21 16:38:41 +00:00
Wez Furlong e419d735c4 Better error message to save looking in the wrong place. 2004-05-21 16:36:37 +00:00
Ilia Alshanetsky 3a5e5ca4d4 Implement ODBC doer. 2004-05-21 16:17:22 +00:00
Wez Furlong 798d437b05 Fix return type here too 2004-05-21 15:33:18 +00:00
Wez Furlong a53edd047e Fix return type 2004-05-21 15:29:09 +00:00
Wez Furlong 5e408e4ee9 Fix setAttribute for oci.
Fix some compiler warnings
2004-05-21 15:25:22 +00:00
Derick Rethans 42bc9637b2 - Fixed order (again) 2004-05-21 15:09:34 +00:00
Dmitry Stogov b9bb0d77a0 Fixed bug #28239 (No results returned on SOAP call, no error given) 2004-05-21 14:50:19 +00:00
Wez Furlong d8d7dd7e14 Allow lazy fetch to work with numeric offsets.
Fix named parameters...
2004-05-21 14:31:51 +00:00
Ilia Alshanetsky 37d8a82b4d Fixed compiler warning. 2004-05-21 14:27:48 +00:00
Ard Biesheuvel c6773a06cd Removed strcpy() call from most common case
Added test for hash index generation
2004-05-21 14:24:34 +00:00
Wez Furlong 64f0ec7bde Update for placeholder flags 2004-05-21 14:15:03 +00:00
Wez Furlong 8f5b212612 store the name length in the same manner as it is stored in zvals 2004-05-21 14:14:32 +00:00
Wez Furlong ed83c5bee5 Tidy up placeholder flags 2004-05-21 14:09:51 +00:00
Ard Biesheuvel 27c3c301bd Added test for duplicate field names when returning rows as hashes or objects
# This change should be in 5.0.0, as it might break BC
2004-05-21 13:46:04 +00:00
Wez Furlong bf48daa8d5 Version 1 of PDO_FETCH_LAZY 2004-05-21 13:26:58 +00:00
Ard Biesheuvel 126531a44b Make sure METADATALENGTH is defined (used by IB 7) 2004-05-21 13:14:56 +00:00
Derick Rethans cb1e4ab6c8 - Fixed TSRM problem in latest commit. 2004-05-21 08:16:13 +00:00
Derick Rethans bc7ad69fbc - Fixed bug #28456 (Problem with enclosed / in uploaded file names) 2004-05-21 08:11:43 +00:00
Greg Beaver f30b95fcf0 fix missing assignment
$this->_errors = array_filter($this->_errors);
2004-05-21 03:43:58 +00:00
Greg Beaver 981948641c fix for BC break
staticGetErrors adds the parameter $level between $purge and $merge, as it will be as common (or more common) as $purge.
2004-05-21 03:33:51 +00:00
Greg Beaver aaa7263bdd Several issues resolved.
fix 1444: PEAR_ErrorStack->push() needs to validate $msg and $code as string/int
add error level checking to hasErrors() and getErrors().
BC break!!:
staticGetErrors adds the parameter $level between $purge and $merge, as it will be as common (or more common) as $purge.
2004-05-21 03:33:19 +00:00
3d9c47eed0 ChangeLog update 2004-05-21 00:39:44 +00:00
Ilia Alshanetsky 9cccfa57b6 Fixed stream leak on error. 2004-05-20 23:37:59 +00:00
Wez Furlong 221710e820 Specify that OCI returns column names in upper case by default 2004-05-20 22:29:26 +00:00
Wez Furlong f0a001a953 Implement case folding of column names as a portability option. 2004-05-20 22:28:53 +00:00
Ilia Alshanetsky 41784bfcff Kill unused var. 2004-05-20 22:24:30 +00:00
Wez Furlong e0ac3f66ae Implement PDO_FETCH_OBJ
# todo (after initial release) - specify a particular class, reuse existing
# objects etc.
2004-05-20 22:06:42 +00:00
Wez Furlong 4cdf143184 Fix build on win32 2004-05-20 21:50:25 +00:00
Andrey Hristov 19d0283ce8 for now removing ":public". Waiting for a decision? ":public" will require
quite a lot of phpt files changes.
2004-05-20 21:15:42 +00:00
Andrey Hristov 44de5a0e8e fixing the tests so to work with the new var_dump() (dumping private and
protected member variables)
2004-05-20 21:13:14 +00:00
Ilia Alshanetsky 43a04beb46 Make username & password parameters optional. 2004-05-20 20:25:22 +00:00
Ilia Alshanetsky afb3979882 Fixed parameter order. 2004-05-20 20:22:07 +00:00
Ilia Alshanetsky ebd608ba18 Added getAttribute() handler.
Fixed leak inside exec().
2004-05-20 20:04:11 +00:00
Edin Kadribasic 7f6343e60d Use native PostgreSQL connect string e.g.
$db = new PDO("pgsql:dbname=template1 user=postgres password=secret");
2004-05-20 19:58:51 +00:00
George Schlossnagle e155ad208a sigh... need to include the null byte in hash keys 2004-05-20 19:19:04 +00:00
Ilia Alshanetsky 15fb957c61 Added MySQL getAttribute() support. 2004-05-20 19:17:32 +00:00
Wez Furlong 5023a7c61c Enable setting the different error modes via PDO::setAttribute() 2004-05-20 19:16:49 +00:00
Ilia Alshanetsky 726e188cce Fixed typo. 2004-05-20 19:14:44 +00:00
Ilia Alshanetsky 42a2b22a4a Added missing user-land constants. 2004-05-20 19:12:24 +00:00
Edin Kadribasic 9cfeb25667 We quote with ' in real databases 2004-05-20 19:09:36 +00:00
Ilia Alshanetsky e596466a1f Added getAttribute() method. 2004-05-20 19:09:35 +00:00
George Schlossnagle b7b7bedabd remove debug 2004-05-20 18:50:21 +00:00
George Schlossnagle c22cb0477c off by one error 2004-05-20 18:44:12 +00:00
George Schlossnagle 3366916203 set active_query_string to null in case of failure 2004-05-20 18:29:59 +00:00
Ilia Alshanetsky 1c2b47c408 Make sure that the error string is freed. 2004-05-20 18:19:03 +00:00
Ilia Alshanetsky b7784d96b0 Fixed possible crash. 2004-05-20 18:10:16 +00:00
Ilia Alshanetsky cf33729c20 Better error message. 2004-05-20 18:05:44 +00:00
Ilia Alshanetsky f8d045619a Last insert id (oids) support. 2004-05-20 18:00:24 +00:00
Wez Furlong 3ec72d3ed9 Revert; obviously I missed the function at the bottom of the file... 2004-05-20 17:59:27 +00:00
George Schlossnagle d16625b803 Support ? as a bind in emulated prepares
Throw informative error when pdo_parse_param fails
2004-05-20 17:56:09 +00:00
Andrey Hristov aafb2b1581 var_dump() now shows private and protected member variables.
Not BC is that since now the public variables are explicitly shown as public
Example :

class a{ protected $a=1; private $b=2;var $c=3;} $a=new a(); var_dump($a);

object(a)#1 (3) {
  ["a:protected"]=>
  int(1)
  ["b:private"]=>
  int(2)
  ["c:public"]=>
  int(3)
}
2004-05-20 17:46:20 +00:00
Ilia Alshanetsky 38eb52b8a7 Make doer() work.
Make error reporting system work.
2004-05-20 17:43:56 +00:00
Wez Furlong 892ec5f535 Export this, so extensions may throw their own exception objects that
they have already instantiated.
2004-05-20 17:41:09 +00:00
George Schlossnagle e3e2370490 keys need to be null-terminated (how did this not get committed before???)
bind-by-name includes the leading : in the name
2004-05-20 17:34:52 +00:00
Wez Furlong 04ccc0134d Add methods for error handling 2004-05-20 17:22:13 +00:00
George Schlossnagle 76b7b5d1e2 iactually support :\w+ as binds 2004-05-20 17:04:57 +00:00
Derick Rethans ee9cc68848 - Removed unused INI sections. 2004-05-20 17:03:24 +00:00
Dmitry Stogov 38ef28e41b Allowing user defined SOAP transports with SoapClient::__doRequest() 2004-05-20 16:55:03 +00:00
Wez Furlong af2aa721df zts fix ;) 2004-05-20 16:17:37 +00:00
Ilia Alshanetsky 40b04cd54b Correctly report errors for statment problems. 2004-05-20 16:13:13 +00:00
Ilia Alshanetsky 0d6aa20880 Error handling support.
Fixed possible crash when trying to fetch data from a failed query.
2004-05-20 15:51:25 +00:00
Ilia Alshanetsky fbbb41a53b Fixed typo. 2004-05-20 15:45:16 +00:00
Ilia Alshanetsky e770b2b411 Fixed compiler warnings. 2004-05-20 13:57:09 +00:00
Wez Furlong d55e20660b Don't dup here either 2004-05-20 10:30:29 +00:00
Wez Furlong 0699938bc4 Don't dup here, PDO will do it as needed 2004-05-20 10:28:26 +00:00
Derick Rethans dcb0ee6ec4 - Allow extra parameters to mail to be forced also from virtual host settings. 2004-05-20 10:24:39 +00:00
Wez Furlong d9decf0dfc Fix prototype.
Use user-supplied path before the default when looking for headers
2004-05-20 10:24:17 +00:00
Edin Kadribasic fa1b0a51d3 Make it compile on windows 2004-05-20 03:02:58 +00:00
Edin Kadribasic 9d6c259988 PostgreSQL PDO driver. 2004-05-20 02:27:49 +00:00
9f5e4a19be ChangeLog update 2004-05-20 00:33:36 +00:00
Ilia Alshanetsky 28aca30c13 Free vars before calling E_ERROR. 2004-05-20 00:11:23 +00:00
Wez Furlong 04c35e3d91 re-jig error handling, and make it co-operate with the PDO error handling system.
Implement $dbh->exec() for OCI.
2004-05-20 00:06:30 +00:00
Wez Furlong e7c72f8455 First cut at a "unified" error handling API. The main thing that is missing
currently is a switch in the dbh to indicate what to do with the errors.
2004-05-20 00:05:22 +00:00
Wez Furlong 08ce920c9e Fix win32 build 2004-05-19 21:36:22 +00:00
Marcus Boerger 0a242a52b3 - Allow to build with ext/mysqli 2004-05-19 20:57:02 +00:00
Marcus Boerger fd90645613 - Allow to compile as builtin module 2004-05-19 20:56:06 +00:00
Ilia Alshanetsky 862247693f Row count cannot be calculated in MySQL without buffering the query. 2004-05-19 20:44:28 +00:00
Ilia Alshanetsky c98a99c263 Added fetchAll and fetchSingle methods for data retrieval. 2004-05-19 20:38:53 +00:00
Ilia Alshanetsky 676dfcf581 Timeout stuff. 2004-05-19 20:38:25 +00:00
Ilia Alshanetsky f4b5abc948 Added support for setting timeout value. 2004-05-19 20:34:57 +00:00
Ilia Alshanetsky 56abe4de4a Prevent possible crash when working with column containing NULL. 2004-05-19 20:34:01 +00:00
George Schlossnagle 38a409c02f exec() now returns affected row count 2004-05-19 19:31:33 +00:00
George Schlossnagle 129997216b exec() now returns row count 2004-05-19 19:27:53 +00:00
George Schlossnagle ee1241ab1a builds on stock rh9 now 2004-05-19 18:51:01 +00:00
Frank M. Kromann 7c5c0fbbea Set correct Win32 line endings and fix ZTS compilation 2004-05-19 18:04:47 +00:00
Ilia Alshanetsky 074ba3fbc0 Added lastInsertId() method for retrieving last insert id.
Made affectedRows() work for MySQL.
Populate error value in MySQL on error.
2004-05-19 17:35:39 +00:00
Ilia Alshanetsky 5a4c3234b9 Skip spaces between connection params. 2004-05-19 17:09:48 +00:00
Ard Biesheuvel fd7a92f046 Fixed unregistered bug (memory leak in printf() & friends) 2004-05-19 16:46:29 +00:00
Ilia Alshanetsky a5a908c4bf Better include path detection. 2004-05-19 16:26:06 +00:00
Wez Furlong 1a91f75193 Add simple error code values and a place to store them 2004-05-19 16:21:43 +00:00
Wez Furlong 641f2c0c40 Let it install correctly when built via phpize 2004-05-19 15:27:27 +00:00
Ilia Alshanetsky c328a15469 More errno stuff. 2004-05-19 15:17:52 +00:00
Ilia Alshanetsky 3dddc0bade Fixed possible crash on connection error. 2004-05-19 15:14:55 +00:00
Ilia Alshanetsky b5f8bd8e9e Simplify config via the use of mysql_config.
Fixed errno naming conflict.
2004-05-19 15:12:05 +00:00
Ilia Alshanetsky c11d6ca38b Copy the headers 2004-05-19 14:27:32 +00:00
Edin Kadribasic bbcf09a833 Typo 2004-05-19 14:23:59 +00:00
Edin Kadribasic e8abbca3a6 Fix configure 2004-05-19 14:02:36 +00:00
Wez Furlong fd6b885a19 Revise $dbh->exec().
The driver doer() method should populate dbh->affected_rows if it can determine its value.
2004-05-19 13:55:41 +00:00
Wez Furlong 6cd27ff8be Add $dbh->exec() method.
Rename $dbh->beginWork() to $dbh->beginTransaction().
2004-05-19 13:43:07 +00:00
Ilia Alshanetsky a0b3e87003 Abort if driver cannot be registered. 2004-05-19 13:34:40 +00:00
Edin Kadribasic 7a214b66ae Cosmetics 2004-05-19 13:28:05 +00:00
Ilia Alshanetsky 741e31bdf3 Removed unused vars. 2004-05-19 13:27:54 +00:00
Wez Furlong 777484b561 update prototype 2004-05-19 12:40:50 +00:00
Wez Furlong f7de5001e2 Update prototype 2004-05-19 12:40:31 +00:00
Wez Furlong 8759648192 Update prepare() prototype.
Attempt to hunt down the cause of a build warning under win32 by adjust the
name of the error function.
2004-05-19 12:40:11 +00:00
Wez Furlong 4116d9fb0e Expand the prepare() prototype to accept additional options. 2004-05-19 12:37:31 +00:00
Sebastian Bergmann 681ded13bc ZTS fix. 2004-05-19 09:23:15 +00:00
Marcus Boerger 29cfd6d24f - Remove unused blocks 2004-05-19 08:56:50 +00:00
Marcus Boerger d94136fc30 - Remove unused blocks 2004-05-19 08:45:46 +00:00
bd29f379e7 ChangeLog update 2004-05-19 00:34:15 +00:00
Ilia Alshanetsky 65e1741d2d Fixed possible memory leak. 2004-05-18 23:26:53 +00:00
Ilia Alshanetsky 46eb5401e7 Better header detection. 2004-05-18 23:07:22 +00:00
Ilia Alshanetsky aecad9e37b Fixed build. 2004-05-18 22:45:53 +00:00
Ilia Alshanetsky cb1239a338 Allow static builds. 2004-05-18 22:31:13 +00:00
Marcus Boerger 007a076cd0 Fix test 2004-05-18 21:27:08 +00:00
Marcus Boerger c8e72410be - Need to operate on module pointer in hash table 2004-05-18 21:19:15 +00:00
Wez Furlong 8d9ced8282 Fix #27638: not cleaning up object files in win32 build 2004-05-18 21:07:01 +00:00
George Schlossnagle f02fb4ada4 should be a strcmp, not a strncmp, thanks, wez 2004-05-18 20:57:19 +00:00
Marcus Boerger 6882000c53 - Make start and length parameter to Limititerator::__construct optional 2004-05-18 20:39:35 +00:00
George Schlossnagle 8233053d24 was leaking query_string's 2004-05-18 20:33:30 +00:00
George Schlossnagle 5f4cfcb009 support the read-only property 'queryString' 2004-05-18 20:26:24 +00:00
Wez Furlong d80297b251 Fix bug #28438: win32 build fails in non-zts mode 2004-05-18 20:14:54 +00:00
George Schlossnagle 2e4c3ea35f forgotten off the last commit 2004-05-18 19:30:43 +00:00
Wez Furlong c4ca0f3378 Give user a nice message when PDO isn't initialized prior to a driver. 2004-05-18 19:30:22 +00:00
Wez Furlong b54a4dfeeb Minor tweaks 2004-05-18 19:25:45 +00:00
Wez Furlong bdd4b84c29 typo.. 2004-05-18 19:25:23 +00:00
Wez Furlong df69bf6c06 mySQL, not Oracle ;) 2004-05-18 19:06:47 +00:00
Wez Furlong 9ec5c3526e Add to win32 build 2004-05-18 19:03:27 +00:00
Ilia Alshanetsky caed65f547 Fixed search path for MySQL. 2004-05-18 18:42:36 +00:00
George Schlossnagle 71728cc2b2 initial import of mysql 3.x pdo driver 2004-05-18 18:01:52 +00:00
Stanislav Malyshev da26db3054 Z_TYPE_P is for zvals 2004-05-18 16:13:57 +00:00
Wez Furlong 17d009c3b4 Update generated parser 2004-05-18 15:58:17 +00:00
Wez Furlong e37b622d3f Add parser to win32 build 2004-05-18 15:58:00 +00:00
Wez Furlong 2a9fa24458 Tweaks for win32 2004-05-18 15:57:46 +00:00
George Schlossnagle 85e3a1bc3b for those without re2c 2004-05-18 15:38:25 +00:00
Wez Furlong f76725902b Fix dl() and extension= 2004-05-18 15:26:32 +00:00
Wez Furlong b949bfe651 Register according to the type specified by the module.
(Helps to fix dl() bug)
2004-05-18 15:26:13 +00:00
George Schlossnagle 70f06be16a license/copyright block 2004-05-18 15:22:58 +00:00
George Schlossnagle a97e1a6646 handle binding/quoting of queries for drivers with emulated prepares 2004-05-18 15:19:31 +00:00
Ilia Alshanetsky 3e0cbfb077 Fixed command line escaping routines for win32. 2004-05-18 13:43:24 +00:00
Edin Kadribasic b1efed9dde Move declarations to the begining of function.
This allows it to actually compile on windows.
2004-05-18 12:32:05 +00:00
Edin Kadribasic e489d93abc TSRM fix 2004-05-18 10:53:53 +00:00
Edin Kadribasic 3b64493a3d No length parameter -> estrdup() 2004-05-18 10:49:06 +00:00
Wez Furlong 3455498219 Probe for some functions; allows pdo_oci to build on the snap machine again. 2004-05-18 10:00:01 +00:00
Wez Furlong 0460174a0d Primitive support for probing headers for functions using a regexp 2004-05-18 09:58:45 +00:00
Wez Furlong c9f736ab6e Skeleton for emulated prepare() 2004-05-18 08:59:27 +00:00
Wez Furlong 5a9864ed2b Update to match new prototype 2004-05-18 08:47:10 +00:00
Wez Furlong 940c896e15 Quoting here leads to problems with databases that really support bound parameters.
We should do this conditionally based on the emulate_prepare flag.
2004-05-18 08:45:28 +00:00
George Schlossnagle 2e36e9d06d only rewrite tmp if quoter returns true 2004-05-18 05:34:52 +00:00
George Schlossnagle 636cc3e1dc auto-quote values before binding them in at execute time 2004-05-18 05:31:01 +00:00
George Schlossnagle 7d40971563 use new prototype 2004-05-18 05:01:16 +00:00
George Schlossnagle 2e281baab9 we need the source string length for binary safe string handling 2004-05-18 05:00:52 +00:00
Wez Furlong 12acb64696 package.xml 2004-05-18 00:45:58 +00:00
Wez Furlong 2653f34210 Skeleton package file 2004-05-18 00:40:01 +00:00
4d7b0e114d ChangeLog update 2004-05-18 00:35:47 +00:00
Sara Golemon b094db390e Bugfix#28404 When type is double we need to access dval, not lval 2004-05-18 00:04:22 +00:00
Wez Furlong d4c5556b8b Let is build under unix.
Tested against IBM DB2 and unixODBC.
Could work with others.
2004-05-17 22:20:11 +00:00
George Schlossnagle fd73439882 include guard 2004-05-17 21:12:30 +00:00
Ilia Alshanetsky 0a38683b14 Correct output. 2004-05-17 20:58:57 +00:00
Sara Golemon cceecdbcdb BugFix# 27982: Provide error message when trying to overwrite an existant file without overwrite context option. 2004-05-17 20:31:59 +00:00
Andrei Zmievski 427561446f Revert the .ini vars patch. Will have to try again next Christmas
apparently.
2004-05-17 20:09:37 +00:00
Wez Furlong cf4127b6b9 Allow PDO OCI to build under unix.
Don't build by default under win32.
2004-05-17 18:17:39 +00:00
Wez Furlong dd84731577 Allow PDO to build as a self-contained extension.
Install headers so that other self-contained extensions may them.
2004-05-17 18:13:03 +00:00
Andrei Zmievski 26eaab7641 Fix the apparent bug (; at the end of parse rule block). 2004-05-17 17:12:07 +00:00
Wez Furlong 79c513db96 Some pedantic fixes for gcc. 2004-05-17 17:00:35 +00:00
Derick Rethans 255a5a8a5b - Document the smtp_port setting in php.ini 2004-05-17 16:30:22 +00:00
Wez Furlong d6c4dee168 ODBC (v3 ish) driver for PDO.
Will not build under unix yet.
2004-05-17 15:43:01 +00:00
Wez Furlong 1b1ced539b OCI driver for PDO, supporting bound input and output parameters.
Will not build under unix yet.
2004-05-17 15:42:33 +00:00
Wez Furlong 684be9cf36 Hello PDO.
Still more to come.  Give it a couple of days before starting to write drivers
for the other databases; a few things might change, so I'd like to coordinate
that, but in a couple of days.
2004-05-17 15:41:51 +00:00
Wez Furlong 3a4f33e31f As discussed with Andi, add this helper API for setting the object pointer from
within the constructor.

Please read the comment for notes about how to use it; in general, you don't
need it, so don't use it.
2004-05-17 11:27:16 +00:00
7d15d8cc3e ChangeLog update 2004-05-17 00:33:01 +00:00
Pierre Joye 9e9576ecfa - T_WHITESPACE for the 1st test... 2004-05-16 21:00:24 +00:00
Pierre Joye a937ae4762 - PHP allows spaces before :: (parent :: foo(); )
Nota bene, requires another change to really check the syntax:
  loop back to the first non white space element and valid it (parent,
  string or var)
2004-05-16 20:55:29 +00:00
Timm Friebe 77c75e786b - Fixed test for LONG_MIN / LONG_MAX for 64-bit platforms 2004-05-16 20:33:44 +00:00
Timm Friebe 425ae98916 - Fixed auto-conversion from long to double when LONG_MAX /
LONG_MIN where overflown
2004-05-16 20:30:35 +00:00
Timm Friebe 7bbe13ac4d - Initial release 2004-05-16 20:28:31 +00:00
Pierre Joye 915e9a555e - Fix #1329, closedir on exit (kameshj at fastmail dot fm) 2004-05-16 15:43:30 +00:00
Pierre Joye d049b24dfd - Fix #1330, unused variable 2004-05-16 15:39:07 +00:00
Pierre Joye 59727034b7 - Fix #1249 (wrong print out the wrong state with force option)
- some NL issues, sorry, commit now too
2004-05-16 15:37:13 +00:00
Ilia Alshanetsky bb88a86240 Do not allocate error buffer at the start of every request. 2004-05-16 15:34:53 +00:00
Marcus Boerger ed5ce047db - Add new test 2004-05-16 14:48:45 +00:00
Ilia Alshanetsky fbd3e0da40 Added missing safe_mode & open_basedir checks. 2004-05-16 14:38:19 +00:00
Marcus Boerger 251b627684 - Fix printf with floats 2004-05-16 14:01:45 +00:00
Wez Furlong 6d7346f4b9 ; 2004-05-16 12:10:35 +00:00
Wez Furlong 57cf4805a9 Add config.w32 template to ext_skel 2004-05-16 11:49:35 +00:00
Rob Richards 9e3956b313 constructors throw DOMException
add DOM_PHP_ERR DomException code
validate tagnames in constructors
use C style comments
update TODO
2004-05-16 10:30:16 +00:00
Brad House 92c72cb8d8 update config.m4 for libmonetra 4.0 compatability.
Library no longer has MCVE_ symbols, the header file has #define\'s to
convert MCVE_ -> M_ to reflect the Monetra name change from MCVE.
More updates to follow.
2004-05-16 02:59:34 +00:00
72d12fb320 ChangeLog update 2004-05-15 00:36:05 +00:00
Andrei Zmievski 66181dde3b .ini variables patch notice 2004-05-14 21:10:02 +00:00
Andrei Zmievski e97f733515 Adding ability to refer to existing .ini variables from within .ini
files. Example:

open_basedir = ${open_basedir} ":/new/dir"
2004-05-14 20:58:15 +00:00
Ilia Alshanetsky 5b4dc50c01 Fixed possible memory leak inside popen(). 2004-05-14 16:12:03 +00:00
01e92c81e7 ChangeLog update 2004-05-14 00:32:50 +00:00
Ilia Alshanetsky d24465ba8a Fixed bug #28386 (wordwrap() wraps lines 1 character too soon). 2004-05-13 17:44:23 +00:00
Ilia Alshanetsky 50260570b4 Make isapi more compatible with apache sapis as far as the creation
$_COOKIE super-global and various $_SERVER values.
2004-05-13 17:21:39 +00:00
Stanislav Malyshev 0821f8f7d9 add sqlite_exec() 2004-05-13 14:19:10 +00:00
Ilia Alshanetsky f7f966f96f Skip session tests if session.save_path is not writable. 2004-05-13 12:53:47 +00:00
Wez Furlong 6571a32c87 Add --enable-memory-limit configure option (defaults to off) 2004-05-13 12:14:56 +00:00
Marcus Boerger fbb28b36b7 - Once ts_free_id() will be used, we cannot call ctors for deleted ids
when creating new threads.
2004-05-13 06:53:21 +00:00
b30bc204c9 ChangeLog update 2004-05-13 00:59:25 +00:00
Marcus Boerger aa7454aba4 - Centralize register and hash operations for startup/register_module
in new zend_register_module_ex().
2004-05-12 23:05:28 +00:00
Marcus Boerger 950ddcc9c2 - Revert to 1.249 2004-05-12 23:03:38 +00:00
Marcus Boerger 88a02ba159 - More work on ts_free_id() but still keep it out 2004-05-12 22:28:28 +00:00
Marcus Boerger c0be906309 ifdef out the ts_free_id until php 5.1 and until it is complete 2004-05-12 22:17:01 +00:00
Ilia Alshanetsky d6ba95c618 Fixed various possible memory leaks. 2004-05-12 20:17:19 +00:00
Ilia Alshanetsky ca5c6a1e91 Fixed bug #28374 (Possible unterminated loop inside
_php_pgsql_trim_message()).
2004-05-12 16:49:47 +00:00
Ard Biesheuvel 8428d0088c Fixed a couple of inconsistencies in param binding
# Previously, empty strings were either rejected (for scaled integers)
# or silently converted to 0 (unscaled integers & floats). Also, in some
# cases, null zvals were converted to empty strings, which were
# consequently rejected as unconvertible values.
# In the new situation, empty strings will be handled as NULLs for
# fields that cannot distinguish between the two (numeric/date/time).
# Additionally, all range and value checking is now carried out by the
# database, so there is a consistent interface for error handling.
2004-05-12 15:16:51 +00:00
Ard Biesheuvel afc9cb151b Dropped support for ancient Interbase versions (< 6)
# This has no consequences for Firebird, as its initial release was based on IB 6
2004-05-12 14:29:42 +00:00
Ard Biesheuvel b4939dfa9a Made ibase_timefmt() check its args more thoroughly and nuked a pointless malloc() 2004-05-12 13:14:55 +00:00
Ard Biesheuvel ecfd014357 Made ibase_gen_id() bail out on incorrect args 2004-05-12 13:07:35 +00:00
Marcus Boerger 8e52e04c30 - Implement ts_free_id() 2004-05-12 10:30:46 +00:00
Marcus Boerger 40a9fd5f76 - Touch 2004-05-12 10:19:06 +00:00
Marcus Boerger 05a9f544a7 - Move hash table destruction to proper location 2004-05-12 10:17:12 +00:00
Marcus Boerger 2d6770f0e6 - Added missing UNREGISTER_INI_ENTRIES 2004-05-12 10:15:48 +00:00
8de360fdbe ChangeLog update 2004-05-12 00:33:00 +00:00
Ilia Alshanetsky bd92164eff Make vprintf() and printf() return the length of the string printed.
Make fprintf() and vfprints() return the correct length of the string
printed.
2004-05-11 19:51:46 +00:00
Ilia Alshanetsky 69b712410b Reset opt_name to NULL to ensure it's not re-used if numeric keys can be
found inside the options array.
2004-05-11 15:59:07 +00:00
Derick Rethans 500f634db9 - Fixed defines 2004-05-11 15:30:54 +00:00
Andi Gutmans 4f77a021ce - Don't allow passing NULL to type hinted parameter. 2004-05-11 14:28:40 +00:00
Ilia Alshanetsky 1842676706 Fixed bug #28355 (glob() does not return error on Linux when it does not
have permission to open the directory).
2004-05-11 13:34:19 +00:00
9540037bb7 ChangeLog update 2004-05-11 00:32:24 +00:00
Ilia Alshanetsky 97d91c7656 Fixed crash inside cpdf_place_inline_image() when working with truecolor
images.
2004-05-10 22:13:08 +00:00
Rob Richards d3b364fdc7 add chregu as maintainer
prep for next release
2004-05-10 20:46:32 +00:00
Christian Stocker 7f9a606b62 Adding next() method 2004-05-10 20:39:04 +00:00
Marcus Boerger 68c22fba72 - Documentation update
- Checkin doxygen config file
# A patched version of doxygen is needed, hopefully 1.3.8 will contain it
2004-05-10 17:26:03 +00:00
Zeev Suraski 428e722d88 - Fix comparison of objects
- Clarify convert_object_to_type()
2004-05-10 14:56:21 +00:00
Rob Richards dbe02eff78 check for dom support
remove comment
2004-05-10 14:38:32 +00:00
Christian Stocker 33cd5e9b43 - added expand support (see http://www.xmlsoft.org/xmlreader.html#Mixing for the details behind
that)
 CVS: ----------------------------------------------------------------------
2004-05-10 13:31:14 +00:00
Stefan Esser 2224276a13 Checking MEMORY_LIMIT before doing emalloc/erealloc solves several ugly problems. 2004-05-10 12:17:25 +00:00
Zeev Suraski 9518107e8e Fix Win32 build 2004-05-10 12:06:09 +00:00
Marcus Boerger b0d27f9e85 - Decouple NAN and INF 2004-05-10 07:23:38 +00:00
Ilia Alshanetsky 9a50bd2de1 Missing part of the upgrade patch. 2004-05-10 02:18:49 +00:00
Marcus Boerger 3988ee2df9 - Fix problems with c mode 2004-05-10 01:42:43 +00:00
5cbb4ab242 ChangeLog update 2004-05-10 00:32:12 +00:00
Ilia Alshanetsky 468e834ef1 Fixed bug #28289 (incorrect resolving of relative paths by glob() in
windows).
2004-05-09 19:01:13 +00:00
Ilia Alshanetsky a4c3c3cd47 GD bug fixing news. 2004-05-09 18:26:40 +00:00
Ilia Alshanetsky f11d064b6a Fixed bug #28304 (Missing bounds check inside imagefilter()). 2004-05-09 18:25:33 +00:00
Ilia Alshanetsky 9557b4013a Fixed bug #28311 (Transparency detection code is off by 1). 2004-05-09 17:47:31 +00:00
Ilia Alshanetsky d3fda74acf Fixed bug #28267 (php_image_filter_contrast calls gdImageBrightness). 2004-05-09 17:39:20 +00:00
Ilia Alshanetsky 6e9c4b3125 Upgrade bundled GD library to 2.0.23.
Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2).
2004-05-09 17:33:50 +00:00
Wez Furlong f8518cc83a Implement com_get_active_object() and a helper object for working with
persistent COM objects.
(That's the last of the stuff I want to sneak in before 5.0 is released).
2004-05-09 15:21:29 +00:00
Wez Furlong 6f8233897e Urgh!
Use the correct function to free messages from php_win_err(), otherwise
we say hello to Mr. S. Fault.
2004-05-09 14:28:19 +00:00
Derick Rethans ca47676650 - Fixed news 2004-05-09 14:22:02 +00:00
John Coggeshall 7b54f02f25 Tell ppl about it. 2004-05-09 14:00:30 +00:00
John Coggeshall 399022f3c5 Renamed tidy_node to tidyNode, removed the tidy_exception class and updated
the tests.
2004-05-09 14:00:14 +00:00
Stanislav Malyshev 255d87b1b8 Add __EXTENSIONS__ define - otherwise it won't compile on Solaris 2004-05-09 11:08:04 +00:00
c9dc23da36 ChangeLog update 2004-05-09 00:35:06 +00:00
Ilia Alshanetsky 28eaa612c1 Fixed typo. 2004-05-08 17:37:28 +00:00
Derick Rethans f7afbb9370 - Fixed type which prevented this extension from being loaded as shared
extension.
2004-05-08 17:34:07 +00:00
Marcus Boerger c7b2568269 - Docu updates
- Add missing example file
- Fix aggregation of inner iterators in examples
2004-05-08 12:35:21 +00:00
Marcus Boerger 629a25643c - Update docu 2004-05-08 12:26:28 +00:00
Marcus Boerger a6feb3f405 - Update examples
- Update documentation
- Move classes/interfaces already implemented in c to new subdir internal
2004-05-08 12:24:15 +00:00
Sergey Kartashoff 26fea0bd80 - mnoGoSearch extension was updated to support CachedCopies of
mnogosearch-3.2.16 or later. Udm_Get_Agent_Param and
  Udm_Store_Doc_Cgi functions were added. MnoGoSearch-3.2.3 stored API
  was removed.
2004-05-08 11:50:40 +00:00
Sara Golemon 96132bf4fe if statement logic would never eval to false. 2004-05-08 05:58:18 +00:00
55ec6950ce ChangeLog update 2004-05-08 00:33:46 +00:00
Rob Richards 0953c573ad allow ->open() and ->XML() to be called statically 2004-05-07 18:38:21 +00:00
Wez Furlong 6686b3f722 spot the vim user 2004-05-07 17:47:27 +00:00
Wez Furlong ce05cea7ee Fix Bug #28317: Avoid recursion in libpcre on windows platform. 2004-05-07 17:47:02 +00:00
Ard Biesheuvel bfcc12ef78 Fix unregistered bug in zval pointer/array juggling
# Thinko: element of a **zval[] is usually not a *zval[]
# I can't believe this has gone undetected for 4+ years!
2004-05-07 15:11:07 +00:00
Marcus Boerger bfc3e689de - Fix bug #28309 2004-05-07 06:13:21 +00:00
5927a5eb18 ChangeLog update 2004-05-07 00:31:54 +00:00
Marcus Boerger 7388b6b9ac - Update examples 2004-05-06 22:55:25 +00:00
Marcus Boerger af7d85db25 - interfaces 'extends' not 'implements' other interfaces 2004-05-06 21:46:40 +00:00
Marcus Boerger 592ee79fc1 - Update documentation 2004-05-06 21:20:50 +00:00
Derick Rethans 5b5207292b - Fixed test 2004-05-06 17:45:27 +00:00
Jay Smith 8f306fd749 Fixed a segfault. (It's possible for large offsets to make strrpos()
read past the end of the haystack string...)
2004-05-06 16:11:50 +00:00
Stanislav Malyshev c6bec7db3b fix line endings 2004-05-06 15:41:59 +00:00
Stanislav Malyshev 74ab20817a Fix fastCGI breakage: due to calling flush on unitialized requests,
request was aborted unless ignore_user_abort is set
2004-05-06 15:23:53 +00:00
Sara Golemon 0dae58bb2a Bugfix #28300 Userspace stream/filter names don't need to be lowercased. 2004-05-06 14:29:33 +00:00
Marc Boeren 35bdc36c5b Call functions by their new, proper names instead of what are now aliases.
Change OCIFetchInto (deprecated) to oci_fetch_array.
2004-05-06 12:22:14 +00:00
Marcus Boerger a9070ba130 Add protos 2004-05-06 09:01:31 +00:00
Marcus Boerger 635052875e Count support for ArrayIterator & ArrayObject 2004-05-06 08:57:20 +00:00
3e038d4398 ChangeLog update 2004-05-06 00:31:51 +00:00
Ard Biesheuvel 18d9462a22 Fixed unregistered bug: array count is incorrect when binding array ids
Fixed unregistered bug: empty numeric/datetime param argument is coerced to
	a string that cannot be handled by the IB API layer
2004-05-05 22:18:35 +00:00
Sara Golemon 0180c36951 BugFix#28287 stream_*_register() not calling __autoload(). 2004-05-05 18:18:57 +00:00
Dmitry Stogov 962ab19c99 Support for classes with __call() method on server side. 2004-05-05 10:52:33 +00:00
Dmitry Stogov 7bddbd7bd0 php_error() -> php_error_docref() (Marcus, Dmitry) 2004-05-05 10:31:26 +00:00
fd0ec1cb45 ChangeLog update 2004-05-05 01:16:24 +00:00
Wez Furlong 4a645e09af news 2004-05-04 15:11:06 +00:00
Wez Furlong 263723ec9b Update for count_elements handler for overloaded objects. 2004-05-04 15:03:48 +00:00
Wez Furlong d056b25c3f Add count_elements handler for overloaded objects. 2004-05-04 15:03:28 +00:00
Wez Furlong 5b5b10f0ca Just in case this header isn't present on the snaps machine. 2004-05-04 15:00:25 +00:00
Wez Furlong c921ceb49c Improve stability.
Give it a new CLSID and change the engine name to ActivePHP5.
Globals registered by the scripting host are now auto-globals and don't
need to be declared global when accessed from within functions.
2004-05-04 14:54:01 +00:00
Ard Biesheuvel d6838a86f3 ibase_query(): Be careful not to return true on error conditions 2004-05-04 12:42:54 +00:00
Martin Jansen 46f2330c19 * Providing the full URL to the coding standards. 2004-05-04 10:43:24 +00:00
Rob Richards adeb21cd8e add package.xml 2004-05-04 08:23:10 +00:00
711422e1e4 ChangeLog update 2004-05-04 00:35:07 +00:00
Wez Furlong 173cf83629 Enable writing to SafeArray dimensions. 2004-05-03 20:10:58 +00:00
Wez Furlong 92d87a6a8d Fix problem when assigning to a variable that holds an instance of
a COM/VARIANT/DOTNET object.
2004-05-03 18:19:07 +00:00
Wez Furlong 8ca144bba5 Fixup some constants and error handling.
Remove unfinished and un-needed function.
2004-05-03 15:51:41 +00:00
Uwe Schindler b39a1e5195 Security fix: Put '\0' string termination before loop 2004-05-03 12:23:25 +00:00
fc4500f7ec ChangeLog update 2004-05-03 00:36:07 +00:00
Marcus Boerger c122763bc0 - Look for missing classes in include_path 2004-05-02 22:55:22 +00:00
Marcus Boerger e72a305091 Update examples 2004-05-02 22:07:32 +00:00
Andi Gutmans 3317070941 - Fix comparison of two objects in non-compatibility mode. 2004-05-02 15:40:46 +00:00
Marcus Boerger 6a4e1fff78 Use caseinsensitive sort 2004-05-02 13:23:30 +00:00
Wez Furlong 4d5ce8cd08 Fix Bug #28251 2004-05-02 11:13:08 +00:00
Marcus Boerger 9216b3d182 Add a notice on STDIN 2004-05-02 09:14:02 +00:00
17a4cea930 ChangeLog update 2004-05-02 00:35:19 +00:00
Marcus Boerger f571b188f9 Don't load modules twice 2004-05-01 20:34:15 +00:00
5fbad6bed5 ChangeLog update 2004-05-01 00:36:00 +00:00
Marcus Boerger ecf8650a36 Autoload class as long as needed 2004-04-30 19:01:06 +00:00
Derick Rethans 5c9d3842bd - HTML entity to ISO char. 2004-04-30 18:00:24 +00:00
Greg Beaver d14b94b8df fix to work with only the installed version of PEAR 2004-04-30 16:45:46 +00:00
Greg Beaver 11be5f887b fix included files and put error messages in PEAR_Downloader where they are needed 2004-04-30 16:37:39 +00:00
Ilia Alshanetsky 91e9545f4f Fixed bug #28228 (number_format() does not allow empty decimal separator). 2004-04-30 13:26:01 +00:00
Marcus Boerger 6f699cea5f Bugfix #28229 (PATCH run-tests tripped up by spaces in names) 2004-04-30 08:18:54 +00:00
Greg Beaver bf87bf816c remove notices in E_ALL for config test in PHP 4.3.6 2004-04-30 03:39:04 +00:00
Greg Beaver 56d7d95c67 hopefully fix this test for all cases 2004-04-30 03:35:43 +00:00
Greg Beaver e349a5e41d update to begin process for next release (release is not imminent) 2004-04-30 02:09:03 +00:00
Greg Beaver 94ff299736 fix unit test to work with 1.3.2 (which will be needed) 2004-04-30 02:06:11 +00:00
Greg Beaver af03ecf9e1 fix 1186: notice in PEAR_Common undeclared $_packageName 2004-04-30 02:05:45 +00:00
Greg Beaver 65ecfc28cf fix unit test with PEAR 1.3.1 2004-04-30 01:57:35 +00:00
66f14d696e ChangeLog update 2004-04-30 00:35:30 +00:00
Marcus Boerger 7f01ec57bf SPL is meant to be in uppercase letters, do it now it works 2004-04-29 23:02:11 +00:00
Marcus Boerger 9aab7d7cdf An oumlaut doesn't work here, need ASCII only 2004-04-29 22:57:23 +00:00
Marcus Boerger a9bdb2ed88 - Fix protos and add notes to the docs
- Reorder func prototypes to show what is common and what is specific
2004-04-29 22:52:49 +00:00
Marcus Boerger 74f21310e3 - ArrayObject::append() must not be called when it refers to an object 2004-04-29 22:25:45 +00:00
Ilia Alshanetsky 6fd3a52665 Fixed bug #28196 (missing error constants in cURL extension). 2004-04-29 16:25:42 +00:00
Ilia Alshanetsky e81addb5ca C++ comments. 2004-04-29 12:59:26 +00:00
Wez Furlong 4b4fae6aa4 another down... 2004-04-29 10:19:16 +00:00
Stanislav Malyshev 239ae7b5fc Fix bug #27876 2004-04-29 09:47:29 +00:00
Marcus Boerger bf5f758c93 - Remove unused variable
- Respect visibility in count() and add a test for that
2004-04-29 07:22:02 +00:00
17d544632e ChangeLog update 2004-04-29 00:36:06 +00:00
Wez Furlong 38795b88ed Add "--disable-all" switch, which will force all arguments to "no" if
they are not specified explicitly. (like the snapshot build, but in
reverse).
2004-04-29 00:17:09 +00:00
Wez Furlong 1ee2b46d2f Should have tested this change before committing. 2004-04-28 23:24:33 +00:00
Marcus Boerger 1721e5d44e - More examples 2004-04-28 21:52:51 +00:00
Marcus Boerger 69e792ee7b Count() was missing 2004-04-28 21:45:41 +00:00
Marcus Boerger 1e264fc509 - Add tests for the examples 2004-04-28 20:10:21 +00:00
Marcus Boerger 4cdc3117c7 - DOS 2 UNIX 2004-04-28 19:58:47 +00:00
Marcus Boerger 63a490cd90 Fix c++ builds 2004-04-28 19:20:28 +00:00
Ilia Alshanetsky 738aa1099f Added missing skip condition. 2004-04-28 15:14:47 +00:00
Wez Furlong 027d450166 Fix for Bug #28161 (and probably others that I can't find in the bug db;
the search interface sucks).

Expand the proxy object so it can handle psuedo array style properties.

ASP/VB code like this:

	headObj.Attribute("RID") = rid

can be expressed like this in PHP:

	$headObj->Attribute['RID'] = $rid;

In theory, this feature can be used for "multi dimensional" properties:

	headObj.Attribute("RID", "Foo") = rid;

like this:

	$headObj->Attribute['RID']['Foo'] = $rid;
2004-04-28 08:23:22 +00:00
b97ecc1820 ChangeLog update 2004-04-28 00:33:46 +00:00
Sara Golemon 1335bc8fb8 Don't strip off those []s, it'll only create problems in wrappers and elsewhere. 2004-04-27 19:28:11 +00:00
Sara Golemon 99b6724a4c BugFix 28187 parse_url does not handle scheme://[0123:4567::89]:12345/etc style IPv6 embedded address URLs 2004-04-27 19:13:13 +00:00
Marcus Boerger e44c06c14e - More examples 2004-04-27 18:15:00 +00:00
Marcus Boerger 953a09969f - Optional parameter to class_exists() that can be used to bypass
__autoload() which can be helpfull in __autoload() itself.
2004-04-27 18:09:40 +00:00
Ilia Alshanetsky 32321488ab Removed C++ style comments. 2004-04-27 17:33:59 +00:00
Marcus Boerger 11690da164 - Some pretection against out-of-memory situations 2004-04-27 17:12:11 +00:00
Marcus Boerger c56ca79733 Fix test 2004-04-27 15:48:20 +00:00
Marcus Boerger 11ce65aeaf - Fix warnings 2004-04-27 15:47:55 +00:00
Marcus Boerger 7a5380297b - Fix ArrayIterator iteration
- Make it seekable
2004-04-27 15:42:45 +00:00
Marcus Boerger 7f37b3f651 Fix LimitIterator by using new handler 2004-04-27 15:41:26 +00:00
Marcus Boerger c896fa34a8 Fix documentation 2004-04-27 15:39:33 +00:00
Marcus Boerger e1cd098925 - no unneccessary retval initialization
- new c-level iterator handler invalidate_current that is optionally
  used to clear internal caching like in implementation of Iterator
2004-04-27 15:38:07 +00:00
Andi Gutmans e780c42f21 - Fix prototypes 2004-04-27 15:18:33 +00:00
Ilia Alshanetsky c527cc8708 Fixed bug #28184 (C++ comments in GD library sources). 2004-04-27 14:59:07 +00:00
Rob Richards 80fd6dcaa4 add relaxNG support
set xml base directory so it is consistant
add validation examples
2004-04-27 10:46:21 +00:00
Greg Beaver 1f22d848e9 fix bug 1242 - notice if multi-dimensional array is passed as a parameter
add optional parameter to staticHasErrors() that allows error determination for a single package
2004-04-27 04:31:39 +00:00
e744a448ab ChangeLog update 2004-04-27 00:35:21 +00:00
Marcus Boerger b526220462 Complete implementation 2004-04-26 22:01:12 +00:00
Marcus Boerger 5ffeb236f4 Update 2004-04-26 21:34:45 +00:00
Ilia Alshanetsky e7d225fda8 Removed pointless check. 2004-04-26 20:14:11 +00:00
Marcus Boerger 54e5ad6b6e Fix prototype 2004-04-26 18:54:18 +00:00
Antony Dovgal af96ad84b5 hmm. this comma is supposed to be a semicolon. 2004-04-26 14:49:41 +00:00
210244b339 ChangeLog update 2004-04-26 00:35:44 +00:00
Derick Rethans c452e275e7 - MFB: Fixed bug #28147 (Crash with drawing anti-alised lines) 2004-04-25 19:45:02 +00:00
Ilia Alshanetsky be901ebeaf Fixed test. 2004-04-25 16:50:47 +00:00
Marcus Boerger e058626c66 Add new iterator example AppendIterator and use it in findfile.php example.
# The initial idea came from a request by Sebastian
2004-04-25 13:06:15 +00:00
Marcus Boerger 9238d1bbbc With the new inheritance rules we need an explicit append method. 2004-04-25 13:04:36 +00:00
Marcus Boerger 5fff6fa361 Skip correct amount of stack entries 2004-04-25 11:28:46 +00:00
Marcus Boerger c5abb9b24c Capture potential problem by error message 2004-04-25 11:25:25 +00:00
Marcus Boerger 286f75c891 Show number of classes 2004-04-25 11:22:56 +00:00
Marcus Boerger 8116ba4249 BFN 2004-04-25 11:19:57 +00:00
Marcus Boerger 5b755c40ea Fix several issues
- bugfix #27063
- bugfix #27929
- bugfix #28099
- bugfix #28125
# The amount of code is needed to solve the return by reference problem.
# dual_it and derived also need their own iterator handlers to be able
# to return by reference.
2004-04-25 11:14:11 +00:00
Andi Gutmans 87a9f7bdbb - RC3-dev 2004-04-25 10:13:08 +00:00
Andi Gutmans 1ccf8dde15 - This was forgotten 2004-04-25 09:15:57 +00:00
Andi Gutmans 94c44ea9eb - RC2 2004-04-25 08:32:50 +00:00
Wez Furlong df14ec2fe2 Spell it out. 2004-04-25 00:41:34 +00:00
a4e94e33b3 ChangeLog update 2004-04-25 00:34:28 +00:00
Ilia Alshanetsky 4e4d861046 Fixed test. 2004-04-24 22:38:51 +00:00
f977f8a90b ChangeLog update 2004-04-24 00:34:14 +00:00
Andi Gutmans 399073f9d4 - Fixed bug #27923. foreach() without a key should not check if the key
- is a reference (Adam)
2004-04-23 21:53:46 +00:00
Andi Gutmans fa2e902436 NEWS 2004-04-23 21:51:39 +00:00
Derick Rethans 43aed8f70b This was already in NEWS for the branch, removing 2004-04-23 18:20:20 +00:00
Derick Rethans 858fc0015f Cleanup NEWS 2004-04-23 18:19:03 +00:00
Rasmus Lerdorf 191a661f8c MFB: Fix for bug #27810 2004-04-23 18:08:58 +00:00
Rob Richards 838d30a5cd move libxml error handler ro rinit/rshutdown to keep it local to php 2004-04-23 17:31:44 +00:00
Ilia Alshanetsky 7a11fe48b6 Fixed bug #28087 (Do not force mysql.trace_mode to 0 on every request). 2004-04-23 17:03:52 +00:00
Derick Rethans 9ee23d7066 - Fixed buffer overflow in phpinfo() for Zend Extension Api NO. 2004-04-23 13:28:25 +00:00
Wez Furlong 16f8b66e46 Another one bites the dust 2004-04-23 13:28:05 +00:00
Dmitry Stogov eba2aa9bd0 Support for <![CDATA[ ]]> for string/hexbinary/base64binary data 2004-04-23 12:22:41 +00:00
Sara Golemon d5e0742e8d In-HEAD bugfix# 28115 2004-04-23 03:37:20 +00:00
f1bad5dab7 ChangeLog update 2004-04-23 00:36:46 +00:00
Marcus Boerger af17964ef4 Avoid warning to interfere test result 2004-04-22 22:55:18 +00:00
Ilia Alshanetsky 9da8328bae Empty query checks, bug #28112. 2004-04-22 22:34:29 +00:00
Marcus Boerger 920e4235a4 Add test for bug #28112 2004-04-22 22:29:41 +00:00
Marcus Boerger ddfb337577 bugfix #28112 2004-04-22 22:26:02 +00:00
Wez Furlong 696663bc3d Add test 2004-04-22 14:29:33 +00:00
Wez Furlong 91dc1a516a A working fix for the safearray mapping bug. 2004-04-22 14:27:11 +00:00
Wez Furlong 73f49c16f4 The fix for the vc7 libc putenv bug is also needed here to avoid a crash. 2004-04-22 14:26:03 +00:00
Hartmut Holzgraefe 9833b429d6 Depercating mime_magic in favor of PECL::fileinfo 2004-04-22 01:24:12 +00:00
Wez Furlong c50726fa4b (probable) fix for Bug #27974: PHP Arrays are not mapped to VARIANTs. 2004-04-22 00:50:49 +00:00
f52e75742b ChangeLog update 2004-04-22 00:35:20 +00:00
Ilia Alshanetsky 8694cd135d Fixed possible crash inside pg_copy_(to|from) function if delimiter is more
then 1 character long.
2004-04-22 00:31:55 +00:00
Ilia Alshanetsky d641ba3eae More C++ comments. 2004-04-21 23:16:34 +00:00
Ilia Alshanetsky 1b80b33b87 C++ comments are ungood ;). 2004-04-21 23:06:26 +00:00
Wez Furlong 03b4f344a0 News about the ssl server socket bug 2004-04-21 23:02:56 +00:00
Wez Furlong e9920ede1f Fix bug #28096 - stream_socket_accept() on an SSL server socket doesn't
enable SSL on the accepted socket.

- Add cipher list context option
- Add helpful hint about why SSL server socket fails with mysterious
  error (eg: you need an SSL certificate for most ciphers).
2004-04-21 23:02:06 +00:00
Hartmut Holzgraefe 375b5df63d libmagic will only consume up to HOWMANY (hardcoded to 65536) bytes
from a file, so lets save bandwith and memory by limiting us to this
2004-04-21 22:49:35 +00:00
Dmitry Stogov c94f0276b0 Support for multiref data 2004-04-21 16:57:18 +00:00
Wez Furlong 0fb4bf9771 Fixed bug #19749 (shouldn't mmap() files larger than memory_limit) 2004-04-21 12:02:47 +00:00
Andi Gutmans 206f0da25a - RC2-dev 2004-04-21 10:34:27 +00:00
Andi Gutmans 40c20d3d72 - Prepare for RC2RC2 (if everything is OK especially Zeev's interface
- patch I'll roll RC2 tomorrow).
2004-04-21 09:59:52 +00:00
Wez Furlong d6cb1431ac yaz moved 2004-04-21 08:57:16 +00:00
Wez Furlong 8090684c5a Moved ext/yaz to PECL. 2004-04-21 08:56:34 +00:00
Zeev Suraski 242aa98b0a Restore fatal error in case a method that's supposed to implement an
interface/abstract method, breaks its prototype
2004-04-21 08:44:37 +00:00
Derick Rethans 142edcf01f - Reorder news 2004-04-21 07:23:40 +00:00
42f26b6fae ChangeLog update 2004-04-21 00:35:41 +00:00
Ilia Alshanetsky 8a23a020e9 Fixed possible memory leaks.
Prevent shm_attach() from destroying non-shm resources.
2004-04-21 00:11:28 +00:00
Frank M. Kromann bfdcc96274 mssql related fixes 2004-04-20 23:55:02 +00:00
Frank M. Kromann 9909a36992 Fix #28007. Compile fails when the SHORT type is undefined (older versions of FreeTDS) 2004-04-20 23:37:08 +00:00
Frank M. Kromann c5f8871734 Fix problem getting return value from stored procedure when it returns multiple results 2004-04-20 23:30:51 +00:00
John Coggeshall 04764e1942 minor update 2004-04-20 18:29:16 +00:00
John Coggeshall 8e1391ce49 No need for exception function, and renamed the 'error_buf' prop to
errorBuffer to conform with the rest of the ext.
2004-04-20 18:28:09 +00:00
Andi Gutmans 844b4738fd - Fix news 2004-04-20 14:18:56 +00:00
Andi Gutmans 71f99771b0 - More news 2004-04-20 14:15:57 +00:00
Andi Gutmans 173782b73e - Fix bug #27283 - Exceptions where the last catch() statement was sometimes
- skipped.
2004-04-20 14:14:55 +00:00
Christian Stocker 65bc57a81f - make static methods calls work from within xslt
- extended tests
2004-04-20 09:24:24 +00:00
e9c3ac04f5 ChangeLog update 2004-04-20 00:35:29 +00:00
Ilia Alshanetsky 39f820b8b8 Fixed compiler warnings. 2004-04-20 00:26:48 +00:00
Marcus Boerger dddbe6f60e Add new tests (by magnus) 2004-04-20 00:00:51 +00:00
Rob Richards f726dc7af1 add ext/libxml/ to the headers path 2004-04-19 19:46:00 +00:00
Rob Richards 5094e4e67c initial revision
requires PHP 5
2004-04-19 18:55:02 +00:00
Marcus Boerger be85c9049b show ini entries and classes for extensions. 2004-04-19 18:02:49 +00:00
Wez Furlong daa90c915c Fix #27865; don't dup STDIN, STDOUT or STDERR when running under CLI. 2004-04-19 17:41:39 +00:00
Derick Rethans 3326b8790e - Is it really this hard?</jani> 2004-04-19 15:15:49 +00:00
John Coggeshall bf937669e0 Adding tidy error handling news 2004-04-19 15:14:31 +00:00
Wez Furlong 73af3afdbe and the news 2004-04-19 15:08:11 +00:00
Wez Furlong 398b4a2fbb Add pty support to proc_open() for systems with Unix98 ptys.
# With permission from Andi
2004-04-19 15:07:30 +00:00
Edin Kadribasic 9bf6b05b87 No need to export anything. Fixes win32 build 2004-04-19 14:13:41 +00:00
7537d97280 ChangeLog update 2004-04-19 00:34:18 +00:00
Ilia Alshanetsky 60292114a0 Simplify code via the use of macros. 2004-04-18 21:49:10 +00:00
Derick Rethans abff9671fb - Whitespace 2004-04-18 14:04:48 +00:00
John Coggeshall 544cdffd90 Fixing a tidy_getopt() bug, and converting all exceptions to E_WARNING 2004-04-18 07:58:19 +00:00
20d52aa8dc ChangeLog update 2004-04-18 00:34:17 +00:00
Derick Rethans c8c5e8bbe6 - MFH: Fix for bug #28042 (greek letters in html to entitity mapping not
correct)
2004-04-17 23:08:02 +00:00
Marcus Boerger d58fe0357d Retval may not be set when zend_execute() is overloaded 2004-04-17 14:02:40 +00:00
57049aff26 ChangeLog update 2004-04-17 00:34:11 +00:00
John Coggeshall ba43e31e24 Fixed construct bug and Windows build. 2004-04-16 21:51:59 +00:00
Derick Rethans 2ed9c955b8 - Fix initializations 2004-04-16 18:55:19 +00:00
Uwe Schindler fb25210072 set Sybase default APPNAME to ("PHP " PHP_VERSION) 2004-04-16 16:27:19 +00:00
John Coggeshall 1fb0de4a6d Modified error handling:
- Trivial errors have been reduced to E_NOTICEs if possible
  - Bad, but not script-stopping errors (i.e. file not file) are E_WARNING
  - Truly bad things that make the extension unusable are not E_ERROR

  Exceptions are thrown only in a OO context for E_WARNINGs.
2004-04-16 15:46:41 +00:00
355678208d ChangeLog update 2004-04-16 00:36:43 +00:00
Marcus Boerger 43e44e4e9f Bugfix #28012, now for snprintf 2004-04-15 23:08:22 +00:00
Marcus Boerger c007130382 Bugfix #28012 spprintf() output inconsistent for %p 2004-04-15 23:04:49 +00:00
Marcus Boerger a455d7846d Handle failure in get_current_data 2004-04-15 21:32:34 +00:00
Andi Gutmans 14edc95ff8 - Temporary fix for bug #27869
- George, you need to implement clone in order for "clone" and
- compatibility mode to work.
2004-04-15 17:25:51 +00:00
Wez Furlong 8307c0204c Fix bug that prevented --without-gd from working 2004-04-15 16:09:36 +00:00
Hartmut Holzgraefe 1d444f9ad2 typo 2004-04-15 15:27:08 +00:00
Hartmut Holzgraefe 702ca7f53f be a bit more explanatory ... 2004-04-15 15:03:26 +00:00
Ilia Alshanetsky dda0dd4825 Fixed test failure if session.use_trans_sid is enabled. 2004-04-15 13:37:50 +00:00
foobar 4a45a8e948 Remove duplicate entries 2004-04-15 12:25:57 +00:00
Wez Furlong 81835bbf47 been stable for a long time now 2004-04-15 11:52:40 +00:00
Dmitry Stogov 8d8c50fed3 Fixed bug #27681 (soap extension fails without HAVE_TM_GMTOFF). 2004-04-15 10:27:53 +00:00
Dmitry Stogov 0d42248ad8 Calls to zend_exception_error() were removed. 2004-04-15 09:35:27 +00:00
foobar 724a221a7b reorder..is this so hard..? :) 2004-04-15 02:37:42 +00:00
c4435ad7b2 ChangeLog update 2004-04-15 00:35:44 +00:00
Marcus Boerger 1c7fdeac21 BFN 2004-04-14 23:41:22 +00:00
Marcus Boerger 00da44519c Bugfix #27997 2004-04-14 23:26:56 +00:00
Frank M. Kromann 6ba2e4bc51 Declare variables before calling functions. This makes tidy compile on Win32. 2004-04-14 19:01:45 +00:00
Andi Gutmans 4774563966 - Add comment 2004-04-14 17:12:04 +00:00
Edin Kadribasic d5c6825241 According to Wez, this is not needed.
It also breaks win32 build.
2004-04-14 13:56:18 +00:00
Andi Gutmans 245dd7367d - RC2-dev 2004-04-14 11:24:17 +00:00
Andi Gutmans acc4cd17ce - RC2RC1 2004-04-14 11:03:47 +00:00
Derick Rethans 3c28fbd6dd - Enable iconv by default 2004-04-14 07:42:38 +00:00
66f5637723 ChangeLog update 2004-04-14 00:35:36 +00:00
Marcus Boerger 087ed66b69 Classnames shall start with an uppercase character 2004-04-13 20:25:49 +00:00
Marcus Boerger 27aee6b1dd Update error messages in tests 2004-04-13 19:08:54 +00:00
Marcus Boerger f0c91bac50 New tests (and ordering of tests) 2004-04-13 19:06:39 +00:00
Marcus Boerger ad2471cbbb Bugfix #27979 2004-04-13 19:06:16 +00:00
Ilia Alshanetsky 793140873b Another setting leak in session code (bug #27963). 2004-04-13 18:18:22 +00:00
Sara Golemon a7ba08a0bd Export symbols needed by bz2_filter 2004-04-13 17:54:47 +00:00
Wez Furlong d16ad34368 This wasn't updated for new parameters for object handlers yet... 2004-04-13 17:51:36 +00:00
foobar e1c7a424ce BFN 2004-04-13 17:28:23 +00:00
Stanislav Malyshev 3c84c9c4bd fix bug #27979 2004-04-13 16:21:24 +00:00
Zeev Suraski 2310acb57a Fix debug_backtrace to show arguments again
We need to merge code from debug_backtrace & debug_print_backtrace at
some point!
2004-04-13 16:07:19 +00:00
Andi Gutmans 4f47f33402 - Fix API no of Engine 2. The first number is the engine version and the
- rest is the API_NO. This way engine2_api_no is always greater than
- engine1_api_no.
2004-04-13 15:27:36 +00:00
Andi Gutmans 979da66118 - Add hook for exception handler (Derick) 2004-04-13 15:19:21 +00:00
Ilia Alshanetsky 254c8d6ce9 Fixed bug #27963 (Session lifetime setting may leak between requests). 2004-04-13 00:39:05 +00:00
9d10977fd7 ChangeLog update 2004-04-13 00:34:35 +00:00
Derick Rethans 2c259a7979 - Add fontpath for win98/XP (Patch by Friedhelm Betz) 2004-04-12 21:42:42 +00:00
Marcus Boerger 33cdc9ed36 Fix order of macro parameter (synch with other macros) 2004-04-12 13:02:54 +00:00
Andi Gutmans 67502a2e7d - modifyable -> modifiable 2004-04-12 12:22:26 +00:00
John Coggeshall 9b21e0d0a9 - Removed things related to attribute classes / consts which no
longer exist in Tidy
- Changed protos in comment blocks to studlyCaps
- Fixed problem where Tidy would throw exceptions if called from
  a procedural context. Tidy will now cause E_ERRORs if called from
  procedural form.
2004-04-12 03:14:19 +00:00
15bc137fef ChangeLog update 2004-04-12 00:33:45 +00:00
Ilia Alshanetsky 8075d977e1 Open basedir & safe_mode exception when copying or attaching to a memory
only database.
2004-04-11 18:53:32 +00:00
14e2e82cf5 ChangeLog update 2004-04-11 00:33:36 +00:00
Marcus Boerger ad4755e257 studlyCaps 2004-04-10 13:56:27 +00:00
f95488a3c9 ChangeLog update 2004-04-10 00:34:29 +00:00
Sara Golemon 3feae65f70 BugFix: Copy/Paste mistake referenced undefined variable on platforms without gettimeofday() 2004-04-09 19:18:59 +00:00
Ard Biesheuvel ff66870b4c Changed ibase_user_[add|modify|delete]() to use service resources 2004-04-09 18:45:30 +00:00
Ilia Alshanetsky 824f9a4d11 Fixed bug #27928 (sqlite incorrectly handles invalid filenames). 2004-04-09 18:02:05 +00:00
Andi Gutmans 7bedd9f824 - NEWS 2004-04-09 14:43:20 +00:00
Andi Gutmans 4a24cbe276 - Fix bug #26441 (When __set() returned a value it corrupted it) 2004-04-09 14:42:06 +00:00
Greg Beaver 8a91c1d5b8 re-organize as per PEAR-Core discussion 2004-04-09 07:38:48 +00:00
Greg Beaver dfa4a5d927 as per PEAR-Core discussion, remove all but absolutely essential
packages for the installer, and for PEAR_Frontend_Web
2004-04-09 01:12:41 +00:00
ca8dc5aca3 ChangeLog update 2004-04-09 00:33:16 +00:00
Greg Beaver 7ab7b99ac1 oops, PHPUnit2, not PHPUnit 2004-04-08 23:52:36 +00:00
Marcus Boerger 6e3b81e385 Add new test 2004-04-08 22:47:13 +00:00
Marcus Boerger 42370213f7 Fix toString() issue again 2004-04-08 22:46:43 +00:00
Marcus Boerger 84ddc25df6 BFN 2004-04-08 20:38:17 +00:00
Marcus Boerger 8ccfca0c41 Bugfix #27519 Reflection_Function constructor crashes with non-existant
function's name
2004-04-08 20:37:06 +00:00
Derick Rethans 3ec166aba4 - Add missing "CEST" timezone 2004-04-08 19:21:05 +00:00
Frank M. Kromann b2913063e0 Remove debug output 2004-04-08 19:08:37 +00:00
Jon Parise ba863b4558 Include Mail 1.1.3 with PHP 5. 2004-04-08 18:27:26 +00:00
Derick Rethans 1f932c30d6 - Added reworded destructor change 2004-04-08 16:19:58 +00:00
Derick Rethans b91a947d5e - Added test and not the diff ;-) 2004-04-08 16:17:35 +00:00
foobar 5d3900a2e9 remove crap 2004-04-08 15:58:35 +00:00
Greg Beaver b3cec4d9d4 Dan wants tabs -> spaces 2004-04-08 15:03:21 +00:00
Greg Beaver eaa48d3743 forgot phpunit -> phpunit2 for php5 2004-04-08 14:59:31 +00:00
Stefan Esser 6b12a45247 Fixed: possible remote overflow and possible efree(NULL) crash 2004-04-08 14:58:04 +00:00
Greg Beaver fdc1b53183 this should update the list
# Pierre-Alain, have you tested frontend_web with pager 2 yet?
2004-04-08 14:30:13 +00:00
Derick Rethans 9d4f01a8af - Test case for bug #20382 2004-04-08 14:18:23 +00:00
Wez Furlong 5e8d0919cf Add code to fetch the pear bundle based on pear/go-pear-list.php
For the moment, this is turned off, but it should be turned on ready for
the next RC.
(waiting for feedback from Edin and the PEAR guys)
2004-04-08 13:36:11 +00:00
Wez Furlong 61144768ed Add this list here, so that pear-core guys can manipulate the PEAR bundle
for the win32 snapshot.
2004-04-08 13:32:50 +00:00
Wez Furlong a8757b11e6 Enable mbregex in win32 build 2004-04-08 11:01:51 +00:00
foobar bb276eb8d4 - Fix test file outputs. 2004-04-08 08:39:41 +00:00
foobar 1789e67088 pfft.. 2004-04-08 07:56:50 +00:00
456c023e83 ChangeLog update 2004-04-08 00:35:41 +00:00
Moriyoshi Koizumi d3a8b31310 - Add missing checks. Maybe fixes PR #27680 2004-04-08 00:30:06 +00:00
Edin Kadribasic 31de856abb Allow compilation with gdlib 1.8 2004-04-07 22:27:32 +00:00
Frank M. Kromann d956e33ed2 avoid deleting needed files when the .cvsignore file contains empty lines (mysqli) 2004-04-07 18:48:23 +00:00
Frank M. Kromann 9a10491752 Export symbols required by zlib_filter extension 2004-04-07 18:47:09 +00:00
Rob Richards fb39035e77 Fix class name 2004-04-07 16:48:11 +00:00
Rob Richards e8340dd2c5 BFN 2004-04-07 16:25:55 +00:00
Rob Richards e32f012e65 Fix bug #27821 xml_parse segfaults when xml_set_object called from class method
fix memleaks in compat.c
2004-04-07 16:24:17 +00:00
Andi Gutmans c534a9e782 - Hopefully fix the debug_backtrace() code. 2004-04-07 15:29:09 +00:00
foobar 99a2a59f01 cleanup 2004-04-07 15:25:29 +00:00
Andi Gutmans 7264ffe50d - Fix crash bug in zend_debug_backtrace(). No idea how come this survived
- for so long....
2004-04-07 14:02:29 +00:00
foobar f1823e58da Revert the patch to "fix" #27664 and added more informal error msg. 2004-04-07 13:56:33 +00:00
Ard Biesheuvel 59f0817205 Don't define ibase_service struct type unless its member types are defined 2004-04-07 10:36:00 +00:00
Stanislav Malyshev 72e2e4fea3 Fix incomplete class for the new object model 2004-04-07 08:06:09 +00:00
84930ecbdf ChangeLog update 2004-04-07 00:34:16 +00:00
Greg Beaver 0715add65f developer -> lead for cellog 2004-04-07 00:29:58 +00:00
Ilia Alshanetsky 9a98c38cbd Removed pointless check. 2004-04-06 23:14:06 +00:00
Greg Beaver e09aff93fb add PEAR_ErrorStack to description of PEAR 2004-04-06 22:18:37 +00:00
Greg Beaver f2e8c04e8a change release date 2004-04-06 22:08:51 +00:00
Rob Richards 7b1f927ef5 register_namespace changed to registerNamespace for consistency 2004-04-06 18:26:19 +00:00
Adam Dickmeiss 1afef889e2 Allow character set conversion for yaz_record's array method, e.g.
yaz_record($id,$pos,"array;charset=marc8,iso-8859-1")
2004-04-06 17:40:05 +00:00
foobar 4ee4d27cb4 reorder, reword, typos.. 2004-04-06 09:53:31 +00:00
foobar 338b9bfb2d Remove duplicate entry 2004-04-06 09:43:18 +00:00
d1aee77c5a ChangeLog update 2004-04-06 00:35:23 +00:00
Ard Biesheuvel 18fa461119 More divide & conquer 2004-04-05 13:22:34 +00:00
Dmitry Stogov f9c5fc6ecb Fix (using patterns) 2004-04-05 05:24:15 +00:00
1bee9e12fb ChangeLog update 2004-04-05 00:35:43 +00:00
Moriyoshi Koizumi 94ec5c2a64 - Let it work safely 2004-04-04 19:23:19 +00:00
Derick Rethans bebddbdd24 - Fixed test 2004-04-04 19:00:53 +00:00
Ilia Alshanetsky bf997c3eb3 Removed unused variable. 2004-04-04 18:28:59 +00:00
Moriyoshi Koizumi 7f5950ffb7 - Fix test: Any datetime value that exceeds the unix time range should
not be unserialized.
2004-04-04 18:07:36 +00:00
Ilia Alshanetsky 3b27b0f18b Fixed a bug that prevented building of gd extension against external GD
lib 1.X.
2004-04-04 17:59:08 +00:00
Ard Biesheuvel 2680fb4a9d CS 2004-04-04 13:51:56 +00:00
Derick Rethans f1141d79c6 - Fixed comment and double 0 2004-04-04 12:45:02 +00:00
Derick Rethans 794846e5c5 - One more test for a date/time related bug. 2004-04-04 12:42:13 +00:00
Marcus Boerger 8fd505f4b4 Add a comment why it is in 2004-04-04 12:31:12 +00:00
1ca4aca8fb ChangeLog update 2004-04-04 01:32:18 +00:00
Andi Gutmans 8838b38fcb Patch by Timm Friebe:
It changes
set_exception_handler() to accept the pseudo-type "callable" (instead of
a string referring to a global function).


Examples:
  set_exception_handler('function_name');
  set_exception_handler(array('class_name', 'static_method'));
  set_exception_handler(array($instance, 'instance_method'));


This also makes set_exception_handler() more consistent with all the
other callback functionality, e.g. set_error_handler().
2004-04-03 21:50:12 +00:00
Derick Rethans efb62ea35f - MFB: Fixed bug #27849 (configure craps out on trivial syntax error). 2004-04-03 17:23:53 +00:00
Andi Gutmans 911922432f - Nuke more old junk 2004-04-03 17:01:13 +00:00
Ard Biesheuvel e7eccf10e6 That should do it 2004-04-03 16:38:10 +00:00
Greg Beaver ae73e40808 fixed #534 for real (remove notice if state=stable doesn't exist, and use "none" for stable version number) 2004-04-03 15:56:00 +00:00
Ard Biesheuvel 4493bbb809 Skip on Windows 2004-04-03 15:29:10 +00:00
Ard Biesheuvel 2daf7303b2 Don't rely on OS-based authentication (as it is not supported under Win32) 2004-04-03 15:24:11 +00:00
Marcus Boerger de56cc51a8 Increase severity level and use a more precise error message. 2004-04-03 14:40:36 +00:00
Andi Gutmans 1c7cfe739d - Nuke code which hasn't been in use for ages. 2004-04-03 11:09:39 +00:00
Ard Biesheuvel b04eb1d3da fclose() tempfile so unlink() doesn't choke on Win32 2004-04-03 11:04:21 +00:00
Ard Biesheuvel cd7e8bdf8c Change definition of ISC_LONG_[MIN|MAX] to please MSVC. 2004-04-03 11:00:14 +00:00
Ard Biesheuvel 5367158046 MFB: more elaborate HUGE_VAL test 2004-04-03 10:42:42 +00:00
Marcus Boerger 53b4597fca Initialize to 0 to prevent valgrind warnings 2004-04-03 09:51:57 +00:00
Greg Beaver b79e803a43 fix Bug #937 throwError() treats every call as static
fix Bug #964 PEAR_ERROR_EXCEPTION causes fatal error
2004-04-03 06:28:54 +00:00
Greg Beaver 9d86149b01 fix #534: pear search doesn't list unstable releases 2004-04-03 06:06:17 +00:00
da4f2be35a ChangeLog update 2004-04-03 02:06:57 +00:00
Greg Beaver 361951bc01 not devel any more 2004-04-03 00:42:20 +00:00
Derick Rethans 95659890ba - Fixed expected shift/reduce conflict count nu,ber 2004-04-02 21:26:35 +00:00
Sara Golemon 60baea9671 Update sample SAPI locations. BugFix# 27829 2004-04-02 20:32:41 +00:00
Dmitry Stogov b010daa9c4 Support for domain cookies 2004-04-02 15:43:41 +00:00
Dmitry Stogov 794358f385 Test file was fixed (implicit cloning strict warnings) 2004-04-02 13:43:58 +00:00
Dmitry Stogov 6f6ef6deed SoapClint support for multiple hosts (through WSDL) with cookies. 2004-04-02 11:12:44 +00:00
Dmitry Stogov 7dae9e6cad Fixed bug #27742 (WDSL SOAP Parsing Schema bug) 2004-04-02 06:23:51 +00:00
9a6dad867d ChangeLog update 2004-04-02 01:32:15 +00:00
Ilia Alshanetsky c85843aec1 MFB: Revert patch for bug #27782. 2004-04-01 22:07:42 +00:00
Ilia Alshanetsky 962c8cc9ef Fixed reversed condition for error reporting. 2004-04-01 22:05:35 +00:00
Derick Rethans b2ed70e4e0 - MFB: Fixed bug #27780 (strtotime(+1 xxx) returns a wrong date/time) 2004-04-01 21:40:56 +00:00
Ard Biesheuvel 0956f5133c CS/WS 2004-04-01 18:23:45 +00:00
Ard Biesheuvel 75df505fe6 Test binding of numeric timestamps 2004-04-01 16:42:25 +00:00
Ard Biesheuvel 563e9dd664 Don't rely on isql anymore, as creating databases is now supported by the API
Changed tests to include ibase_query("SET TRANSACTION ...")
2004-04-01 16:25:51 +00:00
Dmitry Stogov 6a6096ec11 StudlyCaps fix. 2004-04-01 14:37:03 +00:00
Dmitry Stogov f712d46b50 Fixed possible crash 2004-04-01 14:05:55 +00:00
Dmitry Stogov 9dd0826623 Fixed bug #27722 (Segfault on schema without targetNamespace). 2004-04-01 13:44:12 +00:00
Ard Biesheuvel 0d5a3f0b91 WS 2004-04-01 11:38:23 +00:00
Ard Biesheuvel 1eb428e76d Fix unregistered bug (crash when closing db opened with "CREATE DATABASE ...") 2004-04-01 10:56:28 +00:00
Dmitry Stogov 40bb734452 Some small improvments, support for new style constructors, support for exceptions other then SoapFault 2004-04-01 10:47:44 +00:00
Derick Rethans 88c17817a9 - Fixed bug #27822 (is_resource() returns TRUE for closed resources) 2004-04-01 08:54:44 +00:00
Sara Golemon fac9416797 Only wind filters when appending to the read chain. 2004-04-01 03:52:34 +00:00
1d5a6d3f9f ChangeLog update 2004-04-01 01:32:08 +00:00
Sara Golemon 002f7ef393 This leaks when a stream opener proxy opens another stream. 2004-04-01 01:07:54 +00:00
Sara Golemon 72616e6eae BugFix#27619
Filters not applied to pre-buffered stream data.
(esp. http:// streams)
2004-03-31 23:48:59 +00:00
Derick Rethans 29273ca7a9 - Align help output for configure. 2004-03-31 21:11:23 +00:00
Ilia Alshanetsky dbc60edabf Fixed bug #27809 (ftp_systype returns null on some ftp servers). 2004-03-31 20:43:40 +00:00
Hartmut Holzgraefe f8708f369d disallow negative timestamps on windows only 2004-03-31 17:57:33 +00:00
Rob Richards 010c340f29 use new style constructors
fix return for nodelist item
2004-03-31 17:18:59 +00:00
Ilia Alshanetsky 39a43c994e Fixed bug #27802 (default number of children to 8 when PHP_FCGI_CHILDREN is
not defined).
2004-03-31 17:01:01 +00:00
Dmitry Stogov d00b6c7c99 Fixed BUG in zend_post_incdec_property 2004-03-31 15:16:00 +00:00
Andi Gutmans 1c5ea0d7df - Fix typo 2004-03-31 13:11:19 +00:00
5de30d1066 ChangeLog update 2004-03-31 01:32:01 +00:00
Ard Biesheuvel 81cfb1b312 Make time tests more robust against differences in implementation
# FreeBSD mktime() returns -1 if is_dst==1 and no DST timezone is set
2004-03-31 01:00:55 +00:00
Ilia Alshanetsky 8ecdc90763 Fixed generate_array_diff(). 2004-03-30 23:58:47 +00:00
Marcus Boerger 9f8ba2e8a1 Fix tests 2004-03-30 21:17:52 +00:00
Marcus Boerger 76ae4e10bf Fix test 2004-03-30 21:13:05 +00:00
Marcus Boerger 1ffa3cf65d Add more statistics 2004-03-30 19:33:22 +00:00
Ilia Alshanetsky ec4655f864 Fixed bug #27782 (Wrong behaviour of next(), prev() and each()). 2004-03-30 19:08:43 +00:00
Marcus Boerger a5c94d0184 The test script to search for underscores 2004-03-30 18:50:39 +00:00
Marcus Boerger b4bc994680 TSRM fix 2004-03-30 18:39:53 +00:00
Marcus Boerger 5230321731 - Fix Reflection class names
- Add ability to get the extension an internal class was defined in
# This is the patch Andi and me used to search for underscrores...
2004-03-30 18:36:53 +00:00
Frank M. Kromann b4f64e7f7b Fix for #27764. Get return value from a stored procedure not returning any result sets 2004-03-30 17:54:10 +00:00
Stanislav Malyshev 07266a10ab Disabled calling dtors on tsrm_shutdown - calling dtors in tsrm_shutdown makes
modules registering TSRM ids to crash, if they have dtors, since the module
is unloaded before tsrm_shutdown is called. Can be re-enabled after
tsrm_free_id is implemented.
2004-03-30 16:56:01 +00:00
Ard Biesheuvel 04d178f79c Prevent test from failing on least significant digit 2004-03-30 12:36:44 +00:00
Dmitry Stogov 1ed6bb3e63 Using studlyCaps names. 2004-03-30 09:08:23 +00:00
Andi Gutmans 9094dd7a5e - Tiny improvement. 2004-03-30 08:56:29 +00:00
ddb1fdaaa9 ChangeLog update 2004-03-30 01:31:57 +00:00
Marcus Boerger dddf796edf NAN==NAN doest work (Ard) 2004-03-29 23:08:36 +00:00
Ilia Alshanetsky f7fd3a7dcc Removed extra spaces that cause the test to fail. 2004-03-29 21:57:29 +00:00
Wez Furlong 32be6f268b Fix for Bug #26757: session.save_path defaults to bogus value on win32
Merge from branch with one main difference: the default save_path is
set to the empty string on all platforms, whereas the code in the
branch only does so for win32.
2004-03-29 21:44:07 +00:00
Marcus Boerger 904dac52e2 DOM_RET_OBJ for return_value needs to be followed by return 2004-03-29 21:05:16 +00:00
Marcus Boerger 585af2418b Remove debug code 2004-03-29 20:54:46 +00:00
Marcus Boerger 4dc6fe7f62 Fix tests 2004-03-29 20:54:13 +00:00
Marcus Boerger b6321d4e8a Fix class names 2004-03-29 19:58:01 +00:00
Ilia Alshanetsky 0d0fffe98b Fixed compiler warnings. 2004-03-29 19:57:51 +00:00
Marcus Boerger 2ce2300d76 Fix class names 2004-03-29 19:49:17 +00:00
Marcus Boerger 43d3d8a0a4 Fix class names 2004-03-29 19:31:29 +00:00
Marcus Boerger 96b6c7f5f8 Windows part of NAN/INF 2004-03-29 18:58:28 +00:00
Marcus Boerger 8b15b46aa8 Found a NAN/INF solution that should be portable everywhere(?) (Ard,Marcus) 2004-03-29 18:51:47 +00:00
Marcus Boerger afe794c0d6 Allow mixed case search for extensions 2004-03-29 18:48:59 +00:00
Frank M. Kromann 87779f127a Fix for #27743. Make sure Money types are converted and returned correct 2004-03-29 18:32:27 +00:00
Ilia Alshanetsky 8b079070a3 Synchronized bundled GD library with GD 2.0.22. 2004-03-29 18:20:33 +00:00
Sebastian Bergmann c29e9277d0 -clonning+cloning 2004-03-29 15:20:50 +00:00
Dmitry Stogov 75d1e4ca7d Implicit clonning strict warning was added for ze1_compatibility_mode 2004-03-29 15:00:31 +00:00
Jan Lehnardt 775387e32d - be more verbose 2004-03-29 07:49:32 +00:00
Hartmut Holzgraefe 5e3b2e3d31 Test updated to test for additional libxml2/expat inconsistencies 2004-03-29 05:56:18 +00:00
31b042714e ChangeLog update 2004-03-29 01:32:05 +00:00
Ilia Alshanetsky 62c80d5e6e Fixed bug #27731 (error_reporting() inside @ block fails to set
error_reporting level).
2004-03-29 00:50:52 +00:00
Marcus Boerger 16a4376f53 Use lowercasing here 2004-03-28 23:56:18 +00:00
Marcus Boerger 4da754e868 Add ability to pass -n to the executed php 2004-03-28 23:04:53 +00:00
Marcus Boerger 4f855044c7 Improve portability (idea by Ard) 2004-03-28 21:46:43 +00:00
Marcus Boerger 1bf1b64c37 Initialize the complete struct 2004-03-28 21:09:37 +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
Marcus Boerger dce131ebcd Add agrument type info 2004-03-28 17:04:11 +00:00
Stanislav Malyshev 1293330175 check writability on =& too 2004-03-28 16:37:57 +00:00
Marcus Boerger d7cea0945c Fix XSL (Rob/Marcus) 2004-03-28 15:35:01 +00:00
Rasmus Lerdorf 1ece5eb5ad MFB test case for bug #27719 and improve comments in this tricky DST code 2004-03-28 15:03:56 +00:00
Stanislav Malyshev 9be3c9388b - call set handler if assigning to object having this handler
- cleanup: use macros to access object internal vars
2004-03-28 14:57:29 +00:00
Stanislav Malyshev 1cc4a69bbe preserve ZEND_API in definition 2004-03-28 14:32:32 +00:00
Stanislav Malyshev d61d11381b declare as extern 2004-03-28 14:30:49 +00:00
Marcus Boerger 0019c60902 Show progress 2004-03-28 14:12:14 +00:00
Marcus Boerger a7b9cb454e Adapt ecpectations to 5.0 reality 2004-03-28 14:09:47 +00:00
Marcus Boerger 83675b6622 Fix memleak found by Timm 2004-03-28 13:55:06 +00:00
Stanislav Malyshev 9091bf8e5f centralize object-to-scalar conversion, make it work with get handler 2004-03-28 12:08:26 +00:00
Stanislav Malyshev 3b8b43a947 try get handler on printable conversion 2004-03-28 12:06:10 +00:00
Stanislav Malyshev bcf30a04f5 some more clear comments 2004-03-28 12:05:36 +00:00
Stanislav Malyshev c331afa267 Use macros for object parts access 2004-03-28 10:44:48 +00:00
Dmitry Stogov 09d1d232fc fix of fix related to __autoload. (ext/standard/tests/network/bug20134.phpt passes again) 2004-03-28 09:37:30 +00:00
Andrey Hristov 58a52b1641 - Fixed the explanation and example about "classes must be declared before used".
- Added new entry about get_class() (Thanks Lukas for reminding (toStudlyCapOrNotToStudlyCap.txt).
2004-03-28 09:30:21 +00:00
3a836aafd9 ChangeLog update 2004-03-28 01:33:56 +00:00
Marcus Boerger c9c13a7336 Add new test 2004-03-27 15:49:23 +00:00
Marcus Boerger 63338975d4 Even though it is uncommented it should be right 2004-03-27 14:06:28 +00:00
Rui Hirokawa 9018537919 added missing files of oniguruma to mbstring.dsp. 2004-03-27 10:51:34 +00:00
Ard Biesheuvel 437840e85d Put AC_DEFINE in correct place so caching will work properly 2004-03-27 02:03:44 +00:00
Marcus Boerger 4b82cb500f BFN: MFHed #27687 2004-03-27 01:48:39 +00:00
Marcus Boerger e4a6365181 Move defines to proper location 2004-03-27 01:41:32 +00:00
78900ab0f9 ChangeLog update 2004-03-27 01:32:30 +00:00
Marcus Boerger 141049a2e2 Touch after .c 2004-03-27 01:27:53 +00:00
Marcus Boerger 6424efa54a BFN: MFHed 2004-03-27 01:19:02 +00:00
Marcus Boerger 861790dede atof("NAN")/atof("INF") do not work there 2004-03-27 01:00:52 +00:00
Marcus Boerger bc0373b880 Portable solution for bug #27646 that works correct on Windows, too 2004-03-27 00:50:41 +00:00
Marcus Boerger 90c80958b8 Commit the header, too. 2004-03-27 00:39:07 +00:00
Marcus Boerger d508cecfe3 Follow ming_xy naming convention 2004-03-27 00:38:35 +00:00
Frank M. Kromann 3d6ca9f2cc Fix complation errors after convertion to new macro's 2004-03-26 21:56:31 +00:00
Marcus Boerger f956b50f65 Change to studlyCaps convention
# Hopefully discussed enough this time
2004-03-26 21:16:50 +00:00
Marcus Boerger 26b75f56c6 Use studlyCaps and new macros (that should be it) 2004-03-26 21:10:17 +00:00
Marcus Boerger aea24b2a79 Force destructors to have empty signatures 2004-03-26 20:05:35 +00:00
Marcus Boerger 92d8c3d06e Correct that name 2004-03-26 19:53:07 +00:00
Ilia Alshanetsky 9a04c0f956 Fixed bug #27664 (--disable-cli doesn't force --without-pear). 2004-03-26 19:47:19 +00:00
Marcus Boerger 86d3e496f0 let inf be generated by INF constant (thanks to Wez) 2004-03-26 19:45:09 +00:00
Rasmus Lerdorf a40518164b MFB: The 2am offset was a bad choice as this hour doesn't necessarily exist
on a DST switch.  So use 4am instead.  Fixes bug #27719
2004-03-26 19:32:49 +00:00
Sara Golemon c52cc1c333 BugFix 27675 and add regression test. 2004-03-26 19:23:42 +00:00
33b6d03bfe ChangeLog update 2004-03-26 01:34:48 +00:00
Andi Gutmans 43d04ee291 - Fix build (thanks to Timm) 2004-03-26 00:26:19 +00:00
Marcus Boerger a4fba990a4 Pending touch 2004-03-25 22:40:25 +00:00
Marcus Boerger 3450ed948f -Make NAN and INF more portable (atof() doesn't work on MSVC.6 for example)
-Change test to use constants without prior conversion
2004-03-25 22:36:36 +00:00
Marcus Boerger 37a44999d3 Really use studlyCaps here 2004-03-25 22:06:36 +00:00
Derick Rethans fe576c7acb - Stopped file uploads from throwing E_WARNINGs and E_NOTICEs which can not be
hidden from within scripts (and a result value in the $_FILES global can be
  used to see the real failure anyway).
2004-03-25 21:27:23 +00:00
Derick Rethans b2ac395957 - Remove old and deprecated <?php_track_vars?> scanner token. 2004-03-25 21:11:57 +00:00
Ilia Alshanetsky 94d68252d3 Corrected package file. 2004-03-25 20:01:18 +00:00
Hartmut Holzgraefe 33490fdbaa another package description 2004-03-25 19:51:54 +00:00
Andi Gutmans 7313bcd1f4 - Update NEWS 2004-03-25 18:04:08 +00:00
Andi Gutmans e3eb8bdd78 - If __construct() is defined then it will always take precedence over
- old style constructors.
2004-03-25 18:00:50 +00:00
Stanislav Malyshev 7a98f60e1b no need to use result for RECV's - as in PHP4 2004-03-25 14:03:34 +00:00
Stanislav Malyshev 3c3dbc8873 Use get/set handlers for increment.decrement ops on objects 2004-03-25 13:03:04 +00:00
Andi Gutmans d6d52f6f2e /* The compiler is not-reentrant. Make sure we __autoload() only during run-time
* (doesn't impact fuctionality of __autoload()
     */
2004-03-25 11:30:02 +00:00
Marcus Boerger bca4347064 Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header 2004-03-25 08:42:00 +00:00
Dmitry Stogov 2bbba73606 Using ALLOC_HASHTABLE/FREE_HASHTABLE instead of emalloc/free. 2004-03-25 08:14:33 +00:00
e973875d98 ChangeLog update 2004-03-25 01:35:42 +00:00
Hartmut Holzgraefe cc0894b788 more visa to sibira ;) 2004-03-24 18:43:23 +00:00
George Schlossnagle 8b2a760004 added test for property_exists checks. 2004-03-24 15:20:32 +00:00
Dmitry Stogov 55cf45abf5 New autoload protection schema was implemented (Using HashTable instead of boolean flag) 2004-03-24 14:30:59 +00:00
Derick Rethans 9ff10d086a - Revert bogus commit 2004-03-24 14:28:41 +00:00
Dmitry Stogov 6d9d08bf55 Fixed (strict warning was added to expected output) 2004-03-24 14:14:16 +00:00
Stanislav Malyshev 550da4ae7c and set module startup flag on startup 2004-03-24 13:33:26 +00:00
Stanislav Malyshev b514ab2ee9 reset module shutdown flag on startup 2004-03-24 13:31:34 +00:00
Derick Rethans 2face60bef - Fixed NEWS
#- Can we *please* keep this in order?
2004-03-24 13:31:20 +00:00
Dmitry Stogov 7baa132194 Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented) 2004-03-24 13:16:07 +00:00
Dmitry Stogov ec53815b0f Object cloning in ze1 compatibility mode (zend.ze1_compatibility_mode) was reimplemented (Dmitry, Andi) 2004-03-24 10:55:04 +00:00
Antony Dovgal e001a041f3 add account names & emails 2004-03-24 07:46:18 +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
b12f5f7e45 ChangeLog update 2004-03-24 01:33:50 +00:00
Marcus Boerger 962b8d480c Revert studlyCaps change for now
# until we reach a point where the majority knows what they want
2004-03-23 23:30:56 +00:00
Ilia Alshanetsky 0bdfab022a Fixed bug #27661 (snmpget() does not close the socket in some cases). 2004-03-23 23:12:50 +00:00
Marcus Boerger 3f8a43989d Update .c output after .re 2004-03-23 22:33:29 +00:00
Marcus Boerger fdcff80c16 - Allow negative infinity
- Register missing constants, they work anyway but cause an E_NOTICE
# generation by atof() should be portable enough (afaik)
2004-03-23 22:30:25 +00:00
Marcus Boerger b6e3da9b65 BFN 2004-03-23 21:19:53 +00:00
Marcus Boerger c64376bda5 Bugfix #27646: Cannot serialize/unserialize non-finite numeric values 2004-03-23 20:54:00 +00:00
Hartmut Holzgraefe 04c36565eb make sure that all extensions ignore build system helper files
(both autotools and VisualStudio) and common editor backup files
(especially usefull in combination with 'cvsclean')
2004-03-23 19:53:16 +00:00
Hartmut Holzgraefe eeb172b29f "The Visa to Sibiria" (work in progress)
Adding a package.xml to a bundled extension does not only
ease the transition to PECL whereever suitable but also
allows to build and install an extension as "shared" using
the PEAR installer without having to deal with phpize and
friends by hand
2004-03-23 19:46:10 +00:00
Marcus Boerger 82e2b354ac Consitency rules 2004-03-23 08:48:36 +00:00
Marcus Boerger e6a1f04677 Changed sqlite's OO API to studlyCaps. 2004-03-23 08:03:11 +00:00
4507e314af ChangeLog update 2004-03-23 01:32:21 +00:00
Wez Furlong 719d336b4f export libtidy symbols 2004-03-22 23:07:55 +00:00
Wez Furlong 27d7cd8594 update for read handler api change 2004-03-22 22:47:05 +00:00
Ilia Alshanetsky 83e9b7eeee Fixes to allow curl extension to compile against libcurl 7.11.1 2004-03-22 18:42:03 +00:00
Ilia Alshanetsky fc419f10ef Revert patch to imagefillborder. 2004-03-22 17:26:03 +00:00
Andi Gutmans 34667c4b58 - Fix bug 2004-03-22 15:51:07 +00:00
Andi Gutmans 94dc9af5a0 - Remove whitespace 2004-03-22 11:16:24 +00:00
f34db1b437 ChangeLog update 2004-03-22 01:33:55 +00:00
Greg Beaver 578c28fb0c update naming of tests - forgot to rename files before committing,
but this is not a big deal, as the name 'Error_Stack' still makes sense
2004-03-21 23:06:20 +00:00
Greg Beaver 9b530c04f1 added in wrong directory, move to tests/ 2004-03-21 23:02:29 +00:00
Greg Beaver 57b32bdf57 small changes
Use '' instead of ""
allow subclasses to easily change the exception class used just by
overriding the _exceptionClass property
2004-03-21 23:00:54 +00:00
Greg Beaver 4039adabf4 new package.xml to be used for installing tests, to make it easy to collect all tests in the same location for all PEAR packages 2004-03-21 22:57:33 +00:00
Stig Bakken c9a5a75fef * fit copyright header on 80 columns 2004-03-21 22:11:18 +00:00
Andi Gutmans 4ccca568bb - Improve consistency 2004-03-21 21:29:17 +00:00
Georg Richter 460ec22808 ups - changed alias instead of method before 2004-03-21 20:45:57 +00:00
Georg Richter 535b190ac1 renamed get_metadata method to get_result_metadata.
(We have to differentiate between result_metadata and param_metdata.
 mysql_stmt_param_metadata will be added in libmysql 4.1.3)
2004-03-21 20:43:44 +00:00
Stanislav Malyshev 5b0f6b1f34 Update for new read_property API 2004-03-21 18:28:38 +00:00
Stanislav Malyshev 7cf92e79ed return zval *, to make it useful for read_property 2004-03-21 18:27:58 +00:00
Stanislav Malyshev b372b86b89 update to new API 2004-03-21 18:21:46 +00:00
Stanislav Malyshev bd9b600c3c API change for read_property:
instead of bool silent it now gets fetch type
This can be used for creating proxy objects for write contexts
2004-03-21 18:07:27 +00:00
Ilia Alshanetsky ac7283a602 Fixed a possible crash inside libgd's gdImageFillToBorder() due to a stack
overflow.
2004-03-21 18:02:19 +00:00
Andi Gutmans f0b5eeb17b - Nuke unused code 2004-03-21 17:48:51 +00:00
91e3e2ed5c ChangeLog update 2004-03-21 01:33:32 +00:00
Marcus Boerger 9f4be8d2cd Fix test 2004-03-20 16:13:37 +00:00
Marcus Boerger af9788eb32 Fix return value to match std array func behavior 2004-03-20 16:09:42 +00:00
Marcus Boerger bad2a4bca9 Fix test 2004-03-20 12:30:57 +00:00
258f2e3f48 ChangeLog update 2004-03-20 01:32:55 +00:00
Sara Golemon dd28c137f6 Cleanup, minor refactor, and CS 2004-03-19 22:21:53 +00:00
Sara Golemon 75268270d6 Bug Fix #27657: TXT records longer than MAXHOSTNAMELEN cause segfaults. 2004-03-19 21:42:29 +00:00
Marcus Boerger dd5d497541 Fix test
# removing string conversion was a stupid idea
2004-03-19 20:05:39 +00:00
Marcus Boerger edde872904 Fix test 2004-03-19 20:00:18 +00:00
Marcus Boerger 0c8d7457c5 Make test work when user has memory limit setting 2004-03-19 19:56:31 +00:00
Frank M. Kromann 3e7a8e08eb Fix for #26589. Crash when selecting many columns of type Money 2004-03-19 18:45:07 +00:00
Ilia Alshanetsky d45b2c6bc3 MFH: Fixed bug #27628 (Simplify the process of making a POST request via
stream context).
2004-03-19 15:41:26 +00:00
Greg Beaver a145c1b4ce update to 1.3.1dev 2004-03-19 03:16:12 +00:00
85009fd76f ChangeLog update 2004-03-19 01:32:25 +00:00
Greg Beaver 4180b972ae phpunit tests for PEAR_ErrorStack 2004-03-19 00:48:39 +00:00
Greg Beaver 0ba63371ed new Error Stack for PEAR, EXPERIMENTAL until proven solid and stable 2004-03-19 00:48:18 +00:00
Pierre Joye 9bd83f2d81 - Fix the test description and $Id$ 2004-03-18 18:41:32 +00:00
Derick Rethans 9ebaa24aac - Fixed layout 2004-03-18 18:25:22 +00:00
Dmitry Stogov c17d6970b6 *** empty log message *** 2004-03-18 17:34:57 +00:00
Ilia Alshanetsky b176ee99d3 Fixed bug #27633 (Incorrect EOL translation by ftp_get() in ASCII mode). 2004-03-18 17:12:07 +00:00
Dmitry Stogov 7767bacaf8 *** empty log message *** 2004-03-18 17:01:46 +00:00
Dmitry Stogov deb84befae BUG #27469 was fixed (serialize() objects of incomplete class) 2004-03-18 16:54:36 +00:00
Andi Gutmans 814000305a - Back to RC2-dev 2004-03-18 15:27:28 +00:00
Pierre Joye 3d331bc64c - Test for possible data corruption with __set 2004-03-18 15:14:02 +00:00
Zeev Suraski 4f313c79c2 Add missing bug updates 2004-03-18 14:14:26 +00:00
Zeev Suraski aac5c1f6c5 Prepare to roll RC1 2004-03-18 14:12:27 +00:00
Zeev Suraski b8275175ff Fix possible data corruption with __set() 2004-03-18 14:03:58 +00:00
Uwe Schindler fcfe11e9e4 hint to raise stacksize (bug #27231) 2004-03-18 13:37:16 +00:00
Stanislav Malyshev f52edc19a7 Improve error message - on E_STRICT, method is actually called,
so the error shouldn't say it cannot be called.
2004-03-18 13:28:05 +00:00
Georg Richter e6ac744282 fixed problems in mysql_stmt_init (missing alloc from stmt) 2004-03-18 13:04:55 +00:00
Georg Richter 848f123645 removed if type=string: val is allocated for any type of data 2004-03-18 13:03:17 +00:00
Martin Jansen ba7d6efe7b * Converting tabs to spaces 2004-03-18 12:23:57 +00:00
Martin Jansen 254456a4a6 * Typo fixes 2004-03-18 12:21:28 +00:00
Derick Rethans 6a4099ccdd - Reorganize 2004-03-18 10:39:39 +00:00
Dmitry Stogov 787f0bbbb2 *** empty log message *** 2004-03-18 10:21:28 +00:00
Dmitry Stogov 6e63ea45c7 BUG #27457 was fixed (using temporary hash table with string keys only) 2004-03-18 09:48:37 +00:00
Andi Gutmans ed6cbcb480 - Change redefinition of constructor from E_COMPILE_ERROR to E_STRICT. 2004-03-18 08:52:51 +00:00
Andi Gutmans 2004c25041 - Update Changes 2004-03-18 08:12:19 +00:00
Ilia Alshanetsky d0a4801579 s/emalloc/safe_emalloc/ where appropriate. 2004-03-18 02:16:35 +00:00
Ilia Alshanetsky 5442d722c3 Fixed bug #27300 (Improved regex for pg_convert()).
# Patch by benjcarson at digitaljunkies dot ca
2004-03-18 01:34:58 +00:00
9b614ccb5a ChangeLog update 2004-03-18 01:32:14 +00:00
Sascha Schumann 7aa832aba2 Readd x86 implementation 2004-03-17 22:23:15 +00:00
Sara Golemon 4341ee6061 Userspace Directory Stream Test 2004-03-17 20:48:12 +00:00
Marcus Boerger 851c254ef8 Fix CachingIterator's ability to cache string conversion results.
Add a test for that.
2004-03-17 19:58:32 +00:00
Marcus Boerger b967853eb3 Go with implicit call 2004-03-17 19:14:15 +00:00
Marcus Boerger 8cdd2ed319 Explicit cast needed for now 2004-03-17 19:00:44 +00:00
Pierre Joye f223262bcd - Fix crash when an invalid color index is used with imagecolortransparent 2004-03-17 17:07:31 +00:00
985 changed files with 56172 additions and 29458 deletions

No files matched your search

+6396
View File
File diff suppressed because it is too large. Load diff
+1298 -379
View File
File diff suppressed because it is too large. Load diff
+176 -1
View File
@@ -1,6 +1,179 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? March 2004, PHP 5 Release Candidate 1
?? ??? 2004, PHP 5.0.1
10 Aug 2004, PHP 5.0.1RC1
- Rewritten UNIX and Windows install help files. (Documentation Team)
- Updated several libraries bundled with the windows release which now
includes libxml2-2.6.11, libxslt-1.1.7 and iconv-1.9.1. (Rob, Edin)
- Improved and moved ActiveScript SAPI to PECL. (Wez)
- Fixed bug #29577 (MYSQLI_CLIENT_FOUND_ROWS undefined) (Georg)
- Fixed bug #29573 (Segmentation fault, when exception thrown within
PHP function called from XSLT). (Christian)
- Fixed bug #29522 (accessing properties without connection) (Georg)
- Fixed bug #29505 (get_class_vars() severely broken when used with arrays).
(Marcus)
- Fixed bug #29490 (.Net object instantiation failed). (Michael Sisolak).
- Fixed bug #29474 (win32: usleep() doesn't work). (Wez)
- Fixed bug #29449 (win32: feof() hangs on empty tcp stream). (Wez)
- Fixed bug #29437 (Possible crash inside array_walk_recursive()). (Ilia)
- Fixed bug #29431 (crash when parsing invalid address; invalid address
returned by stream_socket_recvfrom(), stream_socket_getname()). (Wez)
- Fixed bug #29409 (Segfault in PHP functions called from XSLT). (Rob)
- Fixed unloading of dynamically loaded extensions.
(Marcus, kameshj at fastmail dot fm)
- Fixed bug #29395 (sqlite_escape_string() returns bogus data on empty
strings). (Ilia, Tony)
- Fixed bug #29392 (com_dotnet crashes when echo'ing an object). (Wez)
- Fixed bug #29368 (The destructor is called when an exception is thrown from
the constructor). (Marcus)
- Fixed bug #29354 (Exception constructor marked as both public and protected).
(Marcus)
- Fixed bug #29342 (strtotime() does not handle empty date string properly).
(Ilia)
- Fixed bug #29340 (win32 build produces invalid php_ifx.dll). (Edin)
- Fixed bug #29335 (fetch functions now use MYSQLI_BOTH as default) (Georg)
- Fixed bug #29291 (get_class_vars() return names with NULLs). (Marcus)
- Fixed bug #29264 (gettext extension not working). (Edin)
- Fixed buf #29258 (variant_date_from_timestamp() does not honour
timezone). (Wez)
- Fixed bug #29236 (memory error when wsdl-cache is enabled). (Dmitry)
- Fixed bug #29132 ($_SERVER["PHP_AUTH_USER"] isn't defined). (Stefan)
- Fixed bug #29119 (html_entity_decode() misbehaves with UTF-8). (Moriyoshi)
- Fixed bug #29109 (SoapFault exception: [WSDL] Out of memory). (Dmitry)
- Fixed bug #29061 (soap extension segfaults). (Dmitry)
- Fixed bug #28985 (__getTypes() returning nothing on complex WSDL). (Dmitry)
- Fixed bug #28895 (ReflectionClass::isAbstract always returns false). (Marcus)
- Fixed bug #28829 (Thread-unsafety in bcmath elementary values). (Sara)
- Fixed bug #28464 (catch() does not catch exceptions by interfaces). (Marcus)
- Fixed ReflectionClass::getMethod() and ReflectionClass::getProperty() to
raise an ReflectionException instead of returning NULL on failure.
(Sebastian)
- Fixed convert.* filters to consume remaining buckets_in on flush. (Sara)
- Fixed bug in mysqli->client_version (Georg)
13 Jul 2004, PHP 5.0.0
- Updated PCRE to provide better error handling in certain cases. (Andrei)
- Changed doc comments to require a single white space after '/**'. (Marcus)
- Fixed bug #29019 (Database not closing). (Marcus)
- Fixed bug #29008 (array_combine() does not handle non-numeric/string keys).
(Ilia)
- Fixed bug #28999 (fixed behaviour of exec() to work as it did in 4.X). (Ilia)
- Fixed bug #28868 (Internal filter registry not thread safe). (Sara)
- Fixed bug #28851 (call_user_func_array has typo in error message). (Marcus)
- Fixed bug #28831 (ArrayObject::offsetGet() does the work of offsetUnset()).
(Marcus)
- Fixed bug #28822 (ArrayObject::offsetExists() works inverted). (Marcus)
- Fixed bug #28789 (ReflectionProperty getValue() fails on public static
members). (Marcus)
- Fixed bug #28771 (Segfault when using xslt and clone). (Rob)
- Fixed bug #28751 (SoapServer does not call _autoload()). (Dmitry)
- Fixed bug #28739 (array_*diff() and array_*intersect() not clearing the fci
cache before work). (Andrey)
- Fixed bug #28721 (appendChild() and insertBefore() unset DOMText).(Rob)
- Fixed bug #28702 (SOAP does not parse WSDL service address correctly). (Dmitry)
- Fixed bug #28699 (Reflection api bugs). (Marcus)
- Fixed bug #28694 (ReflectionExtension::getFunctions() crashes PHP). (Marcus)
- Fixed bug #28512 (Allocate enough space to store MSSQL data). (Frank)
- Fixed bug #28325 (Circular references not properly serialised). (Moriyoshi)
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
7 Jun 2004, PHP 5 Release Candidate 3
- Moved the PDFLib extension to PECL. (Wez)
- Added MySQL 4.1.2-alpha and 4.1.3-beta support to MySQLI extension. (Georg)
- Added support for dumping private/protected properties to var_dump().
(Andrey)
- Added count() support for COM arrays. (Wez)
- Added Firebird/InterBase UDF source that allows PHP functions to be called
from SQL (Ard)
- Removed Firebird/Interbase function ibase_timefmt() (Ard)
- Changed user error handler mechanism to relay to built-in error handler if it
returns false. (Andrei)
- Changed class type hints for function parameters to not allow the passing of
NULL values. (Andi)
- Changed tidy_node to tidyNode and removed tidy_exception. (John)
- Fixed ip2long() to return FALSE if an IP address passed to this function
is not valid. (Derick)
- Fixed memory leak in memory manager. (Andi)
- Fixed problem with exceptions returning from include(). (Dmitry)
- Fixed bug #28641 (Instance of Interface). (Marcus)
- Fixed bug #28430 (Extending mysqli class). (Georg)
- Fixed bug #28311 (Transparency detection code is off by 1).
(Ilia, pikeman at pikeman dot sytes dot net)
- Fixed bug #28304 (Missing bounds check inside imagefilter()). (Ilia)
- Fixed bug #28300 (Userspace stream/filter names forced to lowercase). (Sara)
- Fixed bug #28287 (stream_*_register() not calling __autoload()). (Sara)
- Fixed bug #28267 (php_image_filter_contrast calls gdImageBrightness). (Ilia)
- Fixed bug #28239 (No results returned on SOAP call, no error given). (Dmitry)
- Fixed bug #28205 (num_rows property for statement object). (Georg)
- Fixed bug #28161 (COM: Array style properties could not be accessed). (Wez)
- Fixed bug #28125 (ArrayObject leaks when accessing elements). (Marcus)
- Fixed bug #28100 (NULL parameter support for mysqli_ssl_set). (Georg)
- Fixed bug #28099 (ArrayObject doesn't implement ArrayAccess). (Marcus)
- Fixed bug #27929 (SPL: change visibility of ArrayIterator::__construct).
(Marcus)
- Fixed bug #27640 (memory leak of registered_zend_ini_directives). (Dmitry)
- Fixed bug #27063 (SPL: ArrayObject does not handle PPP correctly). (Marcus)
25 Apr 2004, PHP 5 Release Candidate 2
- Implementing an interface/abstract method with the wrong prototype is now
a fatal error. (Zeev)
- Reimplemented zend.ze1_compatibility_mode to have better PHP 4 compliance.
(Dmitry, Andi)
- Under CLI, fclose() on php://stdin, php://stdout and php://stderr will now
close the real stream. Please update your CLI scripts to use STDIN, STDOUT
and STDERR constants instead of fopen()/fclose(). (Wez)
- Moved yaz extension to PECL. (Wez)
- Added pty support to proc_open(). (Wez)
- Added possibility to check in which extension an internal class was defined
in using reflection API. (Marcus)
- Changed tidy error handling to no longer use exceptions and
renamed the "error_buf" property to errorBuffer. (John)
- Changed class and method names to use studlyCaps convention. (Marcus)
- Changed language parser to throw errors when a non-empty signature is used in
a destructor definition. (Marcus)
- Changed HTTP file uploads not to throw E_WARNINGs and E_NOTICEs. The error
value in the $_FILES global should be used for error handling. (Derick)
- Changed __construct() to always take precedence over old style constructor.
(Dmitry)
- Fixed handling of return values from storred procedures in mssql_execute()
with multiple result sets returned. (Frank)
- Fixed bug #28096 (stream_socket_accept() doesn't work with ssl). (Wez)
- Fixed bug #28007 (compile mssql extension with old versions of FreeTDS
fails). (Frank)
- Fixed bug #27997 (SPL: Crash with getInnerIterator()). (Marcus)
- Fixed bug #27974 (COM doesn't pass array parameters). (Wez)
- Fixed bug #27928 (sqlite incorrectly handles invalid filenames). (Ilia)
- Fixed bug $27923 (in some cases using foreach() to iterate over values
led to a false error message about the key being a reference). (Adam)
- Fixed bug #27865 (STDIN, STDOUT, STDERR are dup()d under CLI). (Wez)
- Fixed bug #27821 (xml_parse() segfaults when xml_set_object() is called from
class method). (Andi, Rob)
- Fixed bug #27742 (WDSL SOAP Parsing Schema bug). (Dmitry)
- Fixed bug #27722 (Segfault on schema without targetNamespace). (Dmitry)
- Fixed bug #27719 (mktime issues on and around DST changeover). (Rasmus)
- Fixed bug #27681 (soap extension fails without HAVE_TM_GMTOFF). (Dmitry)
- Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented)
(Dmitry, Andi)
- Fixed bug #27628 (Simplify the process of making a POST request via stream
context). (Ilia)
- Fixed bug #27619 (filters not applied to pre-buffered stream data). (Sara)
- Fixed bug #27519 (Reflection_Function constructor crashes with non-existant
function's name). (Marcus)
- Fixed bug #27469 (serialize() objects of incomplete class). (Dmitry)
- Fixed bug #27457 (handling of numeric indexes in strtr()). (Dmitry)
- Fixed bug #27397 (debug_backtrace() not showing function arguments). (Zeev)
- Fixed bug #27283 (The last catch statement was sometimes skipped). (Andi)
- Fixed bug #26441 (When __set() returned a value it corrupted it). (Andi)
- Fixed bug #19749 (shouldn't mmap() files larger than memory_limit). (Wez)
18 March 2004, PHP 5 Release Candidate 1
- Fixed numerous bugs with the just-in-time auto-global initialization, that
could cause $_SERVER, $argv/$argc and other variables not to work properly.
(Zeev)
- Fixed data corruption with constant assignments to object properties. (Zeev)
- Changed __toString() to be called automatically only with print and echo
statements. (Andi)
- Replaced the exec_finished hook by the zend_post_deactive hook for
extensions. The new hook will be run after the symbol table and destructors
are run. (Derick)
@@ -75,6 +248,8 @@ PHP NEWS
- Fixed bug #27123 (Fix crash caused by bug in get_object_vars()). (Andi)
- Fixed bug #26677 (mbstring compile errors with IRIX compiler).
(K.Kosako <kosako at sofnec dot co dot jp>, Rui, Moriyoshi)
- Fixed bug #26206 (register_long_arrays breaks superglobals). (Zeev)
- Fixed bug #25724 (argv and argc not defined). (Zeev)
12 Feb 2004, PHP 5 Beta 4
- Changed exceptions so that they must now inherit from the built-in Exception
+10 -18
View File
@@ -37,8 +37,11 @@ The next few rules are more of a technical nature.
messages every day. Woe be to those who attempt to mess with it.
2. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file. Also see
the note below about automatically updating NEWS in your commit message.
bug fixes, improvements, etc., should go into the NEWS file.
NB! Lines, starting with @ will go automagically into NEWS file, but
this is NOT recommended, though. Please, add news entries directly to
NEWS file and don't forget to keep them adjusted and sorted.
3. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
@@ -59,14 +62,10 @@ The next few rules are more of a technical nature.
The format of the commit messages is pretty simple.
If a line begins with #, it is taken to be a comment and will not appear
in the ChangeLog. If the line begins with @, it will be redirected to the
NEWS file. Everything else goes into the ChangeLog.
in the ChangeLog. Everything else goes into the ChangeLog.
It is important to note that if your comment or news logline spans multiple
lines, you have to put # or @ at the beginning of _every_ such line. Every
entry in NEWS has to have a name after it, so if you did it with someone's
help, put both your names there. Your name WILL NOT be automatically put
at the end of the NEWS entry - so, please provide it yourself.
lines, you have to put # at the beginning of _every_ such line.
Example. Say you modified two files, datetime.c and string.c. In datetime.c
you added a new format option for date() function, and in string.c you fixed
@@ -78,17 +77,12 @@ For datetime.c:
(PHP date) Added new 'K' format modifier for printing out number of
days until New Year's Eve.
@- Added new 'K' format modifier that will output the number of days
@ until New Year's Eve. (Bob)
For string.c:
(php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
# Man, that thing was leaking all over the place!
@- Fixed memory leak in trim(). (Bob)
The lines above marked with @ will go into NEWS file automagically, and the
# lines will be omitted from the ChangeLog. Alternatively, you might want
to modify NEWS file directly and not use the @ lines.
The # lines will be omitted from the ChangeLog automagically.
If you fix some bugs, you should note the bug ID numbers in your
commit message. Bug ID should be prefixed by "#" for easier access to
@@ -97,12 +91,10 @@ bug report when developers are browsing CVS via. LXR or Bonsai.
Example:
Fixed pgsql notice handler double free crash bug. Bug #14016
@ Fixed pgsql notice handler double free crash bug. Bug #14016
If you don't see your messages in ChangeLog and NEWS right away, don't worry!
If you don't see your messages in ChangeLog right away, don't worry!
These files are updated once a day, so your stuff will not show up until
somewhat later. Don't go adding stuff to NEWS by hand if you already put @
lines in the commit message.
somewhat later.
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
to look at PHP CVS repository in various ways.
+51 -14
View File
@@ -1,5 +1,5 @@
1. strrpos() and strripos() now use the entire string as a needle.
Be aware that the existing scripts may no longer work as you expect.
1. strrpos() and strripos() now use the entire string as a needle. Be aware
that the existing scripts may no longer work as you expect.
EX :
<?php
@@ -53,18 +53,55 @@
variables_order setting. As in, the CLI version will now always populate
the global $argc and $argv variables.
8. Classes must be declared before used:
8. In some cases classes must be declared before used. It only happens only
if some of the new features of PHP 5 are used. Otherwise the behaviour is
the old.
Example 1 (works with no errors):
<?php
$test = new fubar();
$test->barfu();
class fubar {
function barfu() {
echo 'fubar';
}
$a = new a();
class a {
}
?>
This script is perfectly valid and works in PHP 4 but with PHP 5 there
will be a fatal error like :
Fatal error: Class 'fubar' not found in ....
If there is defined function __autoload() it will be called.
Example 2 (throws an error):
<?php
$a = new a();
interface b{
}
class a implements b {
}
?>
Output (example 2) :
Fatal error: Class 'a' not found in /tmp/cl.php on line 2
9. get_class() starting PHP 5 returns the name of the class as it was
declared which may lead to problems in older scripts that rely on
the previous behaviour - the class name is lowercased.
Example :
<?php
class FooBar {
}
$a = new FooBar();
var_dump(get_class($a));
?>
Output (PHP 4):
string(6) "foobar"
Output (PHP 5):
string(6) "FooBar"
----------------------------------------------------------------------
Example code that will break :
//....
function someMethod($p) {
if (get_class($p) != 'helpingclass') {
return FALSE;
}
//...
}
//...
Possible solution is to search for get_class() in all your scripts and
use strtolower().
+11 -2
View File
@@ -1,11 +1,20 @@
[IMPORTANT NOTICE]
------------------
Please do not ask developers why some or all tests are failing in
your environment! Let us know if you find why it fails. Thank you.
Failed tests usualy indicate a problem with your local system setup
and not within PHP itself (at least for official PHP release versions).
You may decide to automaticaly submit a test summary to our QA workflow
at the end of a test run.
Please do *not* submit a failed test as a bug or ask for help on why
it failed on your system without providing substantial backup information
on *why* the test failed on your special setup. Thank you :-)
[Testing Basics]
----------------
The easiest way to test your PHP build is to run "make test" from the
command line after successfully compiling. This will run the complete
tests for all enabled functionalities and extensions using the PHP
CLI binary.
To execute test scripts, you must build PHP with some SAPI, then you
type "make test" to execute all or some test scripts saved under
"tests" directory under source root directory.
+1 -1
View File
@@ -155,7 +155,7 @@ PHP_FUNCTION(my_get_raw)
HashTable *hash_ptr;
char *raw_var;
if(zend_parse_parameters(2 TSRMLS_CC, "ls|l", &arg, &var, &var_len) == FAILURE) {
if(zend_parse_parameters(2 TSRMLS_CC, "ls", &arg, &var, &var_len) == FAILURE) {
return;
}
-4
View File
@@ -7,13 +7,9 @@ Zend
dimensional arrays.
* Look at replacing c-lib call tolower().
* Make hash API functions work with HASH_OF() to save time.
* Allow to set a default value for call-by-reference-parameters.
eg: function hello (&$pallo = NULL) {}
* Add configure test to determine if dlsym() requires underscore and set
DLSYM_NEEDS_UNDERSCORE accordingly. Perl and zsh have it in configure,
for example. (DONE?)
* Allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
* Native large number support (probably with GNU GMP)
* Const'ify APIs. Right now, many functions leave parameters untouched,
but don't declare those as const. This makes interaction with other
+17
View File
@@ -0,0 +1,17 @@
Zend Engine
-----------
- Look at making zend_constant value member be a zval* instead of zval. (Andi)
- Add the patch for referring to existing .ini vars in .ini files. (Andrei)
- Implement inheritance rules for type hints. (Marcus)
- Implement true/false/NULL as keywords (apply the patch). (Andi, Marcus)
- Implement typehinting for arrays (apply the patch). (Andi, Marcus)
- Find a keyword for the if-set-or operator (apply the patch). (Marcus, all)
- Fix ZTS destruction (apply the patch). (Marcus)
Build System
------------
- Implement load order of built-in extensions (apply the patch). (Wez)
Standard Library
----------------
- Implement new time/date parsing and handling functions. (Derick)
-102
View File
@@ -16,83 +16,6 @@ Responsibility: Andi, Stig?
Time frame: ?
Component: Introspection
get_function_definition(<is_callable> [field]) =>
array(
file => filename
line_start =>
line_end =>
parameters => array( name, byref, default )
static_variables => array( name, value/default )
scope => 'namespace' | 'class' | null
namespace => classname | namespacename | 'main'
protection => protection_flags
phpdoc => pre-scanned-phpdoc-string
type => 'internal' | 'user'
)
get_class_definition(<class> [field]) =>
array(
type => 'internal' | 'user'
file => filename
line_start =>
line_end =>
name => pretty-name
parent => classname | namespace | null
flags => bitfield (ABSTRACT)
methods => array( array( name, phpdoc ) )
default_properties => array( array( name, value, phpdoc ) )
private_properties => array( array( name, value, phpdoc ) )
protected_properties => array( array( name, value, phpdoc ) )
public_properties => array( array( name, value, phpdoc ) )
static_members => array( array( name, value, phpdoc ) )
constants => array( array( name, value, phpdoc ) )
classes => array( array( name, phpdoc ) )
phpdoc => pre-scanned-phpdoc-string
)
get_constant_definition(<constant> [field]) =>
array(
file => filename
line_start =>
line_end =>
name =>
value =>
phpdoc =>
)
get_global_variable_defintion(<name> [field]) =>
array(
file =>
line_start =>
line_end =>
name =>
phpdoc =>
)
We tried to take into account the implementation of each piece of
information, and there are some that are problematic, especially those
regarding constants and global variables (where do we store the extra
information?)
With "pre-scanned-phpdoc-string" we mean converting:
/**
* Blah blah blah
* @param foo ...
*/
to:
Blah blah blah
@param foo
The rest of the phpdoc handling should be left to an extension.
Responsibility: Stig, Andrei, Harald
Time frame: ?
Component: Redesign of API Versioning
Responsibility: ?
Time frame: 1 month
@@ -172,31 +95,6 @@ Responsibility: Sterling, Harald
Time frame: ?
Component: MySQL Extension
Complete rewrite, leveraging the new MySQL 4 / MySQL 5
features.
Responsibility: Georg Richter, Zak Greant
Timeframe: ?
Component: XML
- Rewrite DOMXML and incorporate all (or most of) W3C-DOM2.
- Use the new ZE2 features (Exceptions, setter/getter).
- Add SAX(2), XML Schema.
- XSLT, HTML, XPath, XPointer, DTD Validation will still be
supported, have to find a meaningful API for it.
- Break BC, warn users now.
- Look at the libxml2 patch by lukas schröder and see if we can prevent
memory leaks with it (anyway, getting rid of mem-leaks and intelligent
memory management is on top prio...)
- In the longer term, domxml (or another name, as with todays features
domxml is a little bit misleading) shall be the main xml-class, which
covers most of what's needed for decent XML support in PHP ;)
But there is certainly place for others like Sablotron etc.
Responsibility: Christian Stocker
Timeframe: ?
Component: Test Suite
Extending the test suite with atleast a test for every
function in an extension that doesn't require external
+53 -6
View File
@@ -34,6 +34,9 @@ typedef struct {
size_t size;
ts_allocate_ctor ctor;
ts_allocate_dtor dtor;
#ifdef MBO_0
int done;
#endif
} tsrm_resource_type;
@@ -158,10 +161,14 @@ TSRM_API void tsrm_shutdown(void)
next_p = p->next;
for (j=0; j<p->count; j++) {
if (resource_types_table && resource_types_table[j].dtor) {
resource_types_table[j].dtor(p->storage[j], &p->storage);
if (p->storage[j]) {
#ifdef MBO_0
if (resource_types_table && !resource_types_table[j].done && resource_types_table[j].dtor) {
resource_types_table[j].dtor(p->storage[j], &p->storage);
}
#endif
free(p->storage[j]);
}
free(p->storage[j]);
}
free(p->storage);
free(p);
@@ -219,6 +226,9 @@ TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].size = size;
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].ctor = ctor;
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].dtor = dtor;
#ifdef MBO_0
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].done = 0;
#endif
/* enlarge the arrays for the already active threads */
for (i=0; i<tsrm_tls_table_size; i++) {
@@ -273,9 +283,16 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
tsrm_new_thread_begin_handler(thread_id, &((*thread_resources_ptr)->storage));
}
for (i=0; i<id_count; i++) {
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
if (resource_types_table[i].ctor) {
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i], &(*thread_resources_ptr)->storage);
#if MBO_0
if (resource_types_table[i].done) {
(*thread_resources_ptr)->storage[i] = NULL;
} else
#endif
{
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
if (resource_types_table[i].ctor) {
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i], &(*thread_resources_ptr)->storage);
}
}
}
@@ -420,6 +437,36 @@ void ts_free_thread(void)
/* deallocates all occurrences of a given id */
void ts_free_id(ts_rsrc_id id)
{
#ifdef MBO_0
int i;
int j = TSRM_UNSHUFFLE_RSRC_ID(id);
tsrm_mutex_lock(tsmm_mutex);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Freeing resource id %d", id));
if (tsrm_tls_table) {
for (i=0; i<tsrm_tls_table_size; i++) {
tsrm_tls_entry *p = tsrm_tls_table[i];
while (p) {
if (p->count > j && p->storage[j]) {
if (resource_types_table && resource_types_table[j].dtor) {
resource_types_table[j].dtor(p->storage[j], &p->storage);
}
free(p->storage[j]);
p->storage[j] = NULL;
}
p = p->next;
}
}
}
resource_types_table[j].done = 1;
tsrm_mutex_unlock(tsmm_mutex);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully freed resource id %d", id));
#endif
}
+904
View File
@@ -1,3 +1,907 @@
2004-07-14 Stanislav Malyshev <stas@zend.com>
* zend_object_handlers.c:
be consistent with write_dimension
* zend_object_handlers.c:
fix #28957
2004-07-13 Andi Gutmans <andi@zend.com>
* zend.h:
- 5.0.1-dev
2004-07-13 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_constants.c:
Bugfix #29116 Zend constant warning uses memory after free (jdolecek at
NetBSD dot org)
2004-07-13 Andi Gutmans <andi@zend.com>
* (php_5_0_0)
zend.h:
- Roll PHP 5.0.0
2004-07-12 Ilia Alshanetsky <ilia@prohost.org>
* (php_5_0_0RC4)
zend_execute.c:
Fixed bug #29086 & #28064 (PHP crashes on extremly long scripts).
2004-07-12 Andi Gutmans <andi@zend.com>
* (php_5_0_0RC4)
zend.c:
- Convert zend_class_entry -> zend_class_entry *
2004-07-10 Jon Parise <jon+php@csh.rit.edu>
* zend.c:
DragonFly BSD is derived from FreeBSD and requires the same floating point
precision fix.
2004-07-10 Andi Gutmans <andi@zend.com>
* zend_alloc.c
zend_hash.c
zend_variables.c:
- Better stability during premature shutdown of request startup
2004-07-05 Andi Gutmans <andi@zend.com>
* zend_mm.h:
- Disable zend_mm for 5.0.0
2004-07-03 Andi Gutmans <andi@zend.com>
* zend_alloc.c:
- Should fix mem leak with ZEND_MM. I made this change a while ago and
- rolled it back but I don't remember why. Please test!
2004-07-01 Ilia Alshanetsky <ilia@prohost.org>
* zend_constants.c:
Do not use alloca() where it can be easily abused by the users.
2004-06-25 Wez Furlong <wez.php@thebrainroom.net>
* zend_stream.c
zend_stream.h:
export zend stream functions for zend extensions under windows
2004-06-24 Sara Golemon <php@alphaweb.net>
* zend_execute.c:
Ease off on severity of new error (Using Resources as array offsets)
2004-06-23 Sara Golemon <php@alphaweb.net>
* zend_execute.c:
BugFix #28879 Inconsistent behavior between explicit and implicit array
creation.
Changes:
Throw E_WARNING "Illegal offset type" when explicitly creating
array elements with objects, arrays, or resorces as indexes.
This matches implicit creation w/ obj/arr indices.
Throw E_WARNING "Resource ID#%ld used as offset, casting to integer (%ld)"
when implicitly creating array with resource as index. (BC)
2004-06-19 Sebastian Bergmann <sb@sebastian-bergmann.de>
* zend_reflection_api.c:
Reflection_* -> Reflection*. Patch by Timm Friebe.
2004-06-18 Sara Golemon <php@alphaweb.net>
* zend_execute.c:
Another typo in converting array index doubles to long.
2004-06-18 George Schlossnagle <george@omniti.com>
* zend_builtin_functions.c:
fix for 28213.
class_name and call_type should be reinitialized on every loop iter.
2004-06-17 Sara Golemon <php@alphaweb.net>
* zend_builtin_functions.c:
String length in parse_parameters should be int
2004-06-15 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_reflection_api.c:
2004-06-14 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_language_scanner.l:
Need {} here
2004-06-10 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_language_scanner.l:
- Require a single white-space char after /** to start a doc comment that
way we prevent /*** from becoming a doc comment (as requested Derick).
* zend_API.h:
Add missing declaration
* zend_reflection_api.c:
Small code layout change
* zend_language_scanner.l:
Do not require NEWLINE at start of doccomment
* zend_reflection_api.c:
Bugfix #28699: Reflection api bugs
2004-06-09 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_reflection_api.c:
Fix Bug #28694 ReflectionExtension::getFunctions() crashes PHP
2004-06-07 Andi Gutmans <andi@zend.com>
* zend.h:
- Go back to -dev (Shouldn't need another RC)
* (php_5_0_0RC3)
zend.h:
- Roll RC3
2004-06-06 Stefan Esser <sesser@suspekt.org>
* zend_compile.h
zend_opcode.c:
Fixed Zend Function Destructor to use correct TSRM handle.
2004-06-05 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_API.c:
Fix #28641: Instance of Interface
2004-06-03 Andi Gutmans <andi@zend.com>
* (php_5_0_0RC3RC2)
zend.h:
- Prepare for RC3RC2
2004-06-02 Andi Gutmans <andi@zend.com>
* zend_mm.h:
- Don't use ZEND_MM in Windows
2004-06-02 Stanislav Malyshev <stas@zend.com>
* zend_execute.c:
fix incdec - make value's refcount non-zero when passing to
write_property - otherwise __set caller cleanup could kill it.
2004-06-01 Andi Gutmans <andi@zend.com>
* zend.c:
- If user error handler returns "false" then we relay to the built in error
handler
2004-05-31 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_reflection_api.c:
Refcount must not be set separatley again.
* zend_reflection_api.c
zend_reflection_api.c:
Add missing initialization
* zend_compile.c:
2004-05-28 Andrei Zmievski <andreiz@gmail.com>
* zend.c:
Allow user-defined error handlers to indicate whether default error
handler should be re-invoked, by returning true or false.
2004-05-28 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_execute.c:
Prevent possible problems with illegal properties
2004-05-28 Derick Rethans <php@derickrethans.nl>
* zend_builtin_functions.c:
- Make the default mask for user defined error handlers include ALL errors,
including E_STRICT.
2004-05-27 Andi Gutmans <andi@zend.com>
* zend.h:
- Back to RC3-dev until we roll final
* (php_5_0_0RC3RC1)
zend_execute.c:
- Fix problem with exceptions returning from include(). (Dmitry)
* (php_5_0_0RC3RC1)
zend.h:
- RC3RC1
2004-05-26 Wez Furlong <wez.php@thebrainroom.net>
* zend_object_handlers.c:
Fix leak on systems where alloca isn't really alloca.
2004-05-26 Andrei Zmievski <andreiz@gmail.com>
* zend_constants.c:
Avoid unnecessary and silly copying of constant name when registering.
2004-05-26 Andi Gutmans <andi@zend.com>
* zend_alloc.c:
- Fix memory manager problem
2004-05-26 Sebastian Bergmann <sb@sebastian-bergmann.de>
* ZEND_CHANGES:
Update Reflection API class names. Whitespace fixes.
2004-05-25 Andi Gutmans <andi@zend.com>
* zend_objects_API.h:
- Nuke unused decleration
* zend_alloc.c
zend_alloc.h:
- More fixes
* zend_alloc.c
zend_alloc.h:
- Make fix compile.
* zend_alloc.c
zend_alloc.h:
- Fix memory leak in mem cache in conjunction with Zend MM. How come no one
- noticed this? :)
2004-05-23 Andi Gutmans <andi@zend.com>
* zend_objects_API.c:
- Fix problem with object being destroyed more than once
* zend_builtin_functions.c:
- Fix the following script (it crashed):
<?php
class ErrorHandler {
function __construct() {
set_error_handler(array(&$this, 'handle'));
}
function __destruct() {
restore_error_handler();
}
function handle($code, $msg, $file, $line, $locals) {
}
}
new ErrorHandler();
?>
2004-05-20 Wez Furlong <wez.php@thebrainroom.net>
* zend_exceptions.c
zend_exceptions.h:
Revert; obviously I missed the function at the bottom of the file...
* zend_exceptions.c
zend_exceptions.h:
Export this, so extensions may throw their own exception objects that
they have already instantiated.
2004-05-18 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_API.c:
- Need to operate on module pointer in hash table
2004-05-18 Wez Furlong <wez.php@thebrainroom.net>
* zend_execute_API.c:
Fix bug #28438: win32 build fails in non-zts mode
2004-05-18 Stanislav Malyshev <stas@zend.com>
* zend_API.c:
Z_TYPE_P is for zvals
2004-05-18 Wez Furlong <wez.php@thebrainroom.net>
* zend_API.c:
Register according to the type specified by the module.
(Helps to fix dl() bug)
2004-05-18 Sara Golemon <php@alphaweb.net>
* zend_execute.c:
Bugfix#28404 When type is double we need to access dval, not lval
2004-05-17 Andrei Zmievski <andreiz@gmail.com>
* zend_ini_parser.y
zend_ini_scanner.l:
Revert the .ini vars patch. Will have to try again next Christmas
apparently.
* zend_ini_parser.y:
Fix the apparent bug (; at the end of parse rule block).
2004-05-17 Wez Furlong <wez.php@thebrainroom.net>
* zend_objects_API.c
zend_objects_API.h:
As discussed with Andi, add this helper API for setting the object pointer
from
within the constructor.
Please read the comment for notes about how to use it; in general, you
don't
need it, so don't use it.
2004-05-14 Andrei Zmievski <andrei@gravitonic.com>
* zend_ini_parser.y
zend_ini_scanner.l:
Adding ability to refer to existing .ini variables from within .ini
files. Example:
open_basedir = ${open_basedir} ":/new/dir"
2004-05-12 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_API.c:
- Centralize register and hash operations for startup/register_module
in new zend_register_module_ex().
* zend_API.c:
- Revert to 1.249
2004-05-11 Andi Gutmans <andi@zend.com>
* zend_compile.c:
- Don't allow passing NULL to type hinted parameter.
2004-05-10 Zeev Suraski <zeev@zend.com>
* zend_operators.c:
- Fix comparison of objects
- Clarify convert_object_to_type()
2004-05-10 Stefan Esser <sesser@suspekt.org>
* zend_alloc.c:
Checking MEMORY_LIMIT before doing emalloc/erealloc solves several ugly
problems.
2004-05-04 Wez Furlong <wez.php@thebrainroom.net>
* zend_iterators.c
zend_object_handlers.c
zend_object_handlers.h
zend_objects_API.c:
Add count_elements handler for overloaded objects.
2004-05-02 Andi Gutmans <andi@zend.com>
* zend_operators.c:
- Fix comparison of two objects in non-compatibility mode.
2004-05-01 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_API.c:
Don't load modules twice
2004-04-29 Stanislav Malyshev <stas@zend.com>
* zend_execute.c:
Fix bug #27876
2004-04-28 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_exceptions.h:
Fix c++ builds
2004-04-27 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_builtin_functions.c:
- Optional parameter to class_exists() that can be used to bypass
__autoload() which can be helpfull in __autoload() itself.
* zend_interfaces.c:
- Fix warnings
* zend_interfaces.c
zend_interfaces.h
zend_iterators.h:
- no unneccessary retval initialization
- new c-level iterator handler invalidate_current that is optionally
used to clear internal caching like in implementation of Iterator
2004-04-27 Andi Gutmans <andi@zend.com>
* zend_reflection_api.c:
- Fix prototypes
2004-04-26 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_reflection_api.c:
Fix prototype
2004-04-25 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_builtin_functions.c:
Skip correct amount of stack entries
* zend_interfaces.c:
Capture potential problem by error message
* zend_reflection_api.c:
Show number of classes
2004-04-25 Andi Gutmans <andi@zend.com>
* zend.h:
- RC3-dev
* (php_5_0_0RC2)
zend.h:
- RC2
2004-04-23 Andi Gutmans <andi@zend.com>
* zend_compile.c:
- Fixed bug #27923. foreach() without a key should not check if the key
- is a reference (Adam)
2004-04-21 Andi Gutmans <andi@zend.com>
* zend.h:
- RC2-dev
* (php_5_0_0RC2RC2)
zend.h:
- Prepare for RC2RC2 (if everything is OK especially Zeev's interface
- patch I'll roll RC2 tomorrow).
2004-04-21 Zeev Suraski <zeev@zend.com>
* (php_5_0_0RC2RC2)
zend_compile.c:
Restore fatal error in case a method that's supposed to implement an
interface/abstract method, breaks its prototype
2004-04-20 Andi Gutmans <andi@zend.com>
* zend_language_parser.y:
- Fix bug #27283 - Exceptions where the last catch() statement was
sometimes
- skipped.
2004-04-19 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_reflection_api.c:
show ini entries and classes for extensions.
2004-04-17 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend.c:
Retval may not be set when zend_execute() is overloaded
2004-04-15 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_execute.c:
Handle failure in get_current_data
2004-04-14 Andi Gutmans <andi@zend.com>
* zend_extensions.h:
- Add comment
* zend.h:
- RC2-dev
* (php_5_0_0RC2RC1)
zend.h:
- RC2RC1
2004-04-13 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_exceptions.c:
Classnames shall start with an uppercase character
2004-04-13 Zeev Suraski <zeev@zend.com>
* zend_builtin_functions.c:
Fix debug_backtrace to show arguments again
We need to merge code from debug_backtrace & debug_print_backtrace at
some point!
2004-04-13 Andi Gutmans <andi@zend.com>
* zend_extensions.h:
- Fix API no of Engine 2. The first number is the engine version and the
- rest is the API_NO. This way engine2_api_no is always greater than
- engine1_api_no.
* zend.c
zend_exceptions.c
zend_exceptions.h:
- Add hook for exception handler (Derick)
2004-04-12 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_API.h:
Fix order of macro parameter (synch with other macros)
2004-04-12 Andi Gutmans <andi@zend.com>
* OBJECTS2_HOWTO
zend_extensions.h
zend_ini.c
zend_ini.h
zend_modules.h:
- modifyable -> modifiable
2004-04-09 Andi Gutmans <andi@zend.com>
* zend_object_handlers.c:
- Fix bug #26441 (When __set() returned a value it corrupted it)
2004-04-08 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_reflection_api.c:
Bugfix #27519 Reflection_Function constructor crashes with non-existant
function's name
2004-04-07 Andi Gutmans <andi@zend.com>
* zend_builtin_functions.c:
- Hopefully fix the debug_backtrace() code.
* zend_builtin_functions.c:
- Fix crash bug in zend_debug_backtrace(). No idea how come this survived
- for so long....
2004-04-04 Ilia Alshanetsky <ilia@prohost.org>
* zend_objects_API.c:
Removed unused variable.
2004-04-03 Andi Gutmans <andi@zend.com>
* zend_builtin_functions.c:
Patch by Timm Friebe:
It changes
set_exception_handler() to accept the pseudo-type "callable" (instead of
a string referring to a global function).
Examples:
set_exception_handler('function_name');
set_exception_handler(array('class_name', 'static_method'));
set_exception_handler(array($instance, 'instance_method'));
This also makes set_exception_handler() more consistent with all the
other callback functionality, e.g. set_error_handler().
* zend_operators.c:
- Nuke more old junk
* zend.h
zend_operators.c
zend_operators.h:
- Nuke code which hasn't been in use for ages.
2004-04-01 Ilia Alshanetsky <ilia@prohost.org>
* zend_builtin_functions.c:
MFB: Revert patch for bug #27782.
* zend_execute.c
tests/bug27731.phpt:
Fixed reversed condition for error reporting.
2004-03-31 Dmitry Stogov <dmitry@zend.com>
* zend_execute.c:
Fixed BUG in zend_post_incdec_property
2004-03-31 Andi Gutmans <andi@zend.com>
* zend_reflection_api.c:
- Fix typo
2004-03-30 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* tests/bug26695.phpt:
Fix test
2004-03-30 Ilia Alshanetsky <ilia@prohost.org>
* zend_builtin_functions.c:
Fixed bug #27782 (Wrong behaviour of next(), prev() and each()).
2004-03-30 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_reflection_api.c:
TSRM fix
* zend.c
zend.h
zend_API.c
zend_API.h
zend_globals.h
zend_reflection_api.c:
- Fix Reflection class names
- Add ability to get the extension an internal class was defined in
2004-03-29 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* acconfig.h:
NAN==NAN doest work (Ard)
* zend_builtin_functions.c:
Allow mixed case search for extensions
2004-03-29 Sebastian Bergmann <sb@sebastian-bergmann.de>
* zend_execute.c:
-clonning+cloning
2004-03-29 Dmitry Stogov <dmitry@zend.com>
* zend_execute.c:
Implicit clonning strict warning was added for ze1_compatibility_mode
2004-03-29 Ilia Alshanetsky <ilia@prohost.org>
* zend_execute.c
tests/bug27731.phpt:
Fixed bug #27731 (error_reporting() inside @ block fails to set
error_reporting level).
2004-03-28 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_API.c:
Use lowercasing here
* zend.c:
Initialize the complete struct
2004-03-28 Stanislav Malyshev <stas@zend.com>
* zend_language_parser.y:
check writability on =& too
* zend_execute.c:
- call set handler if assigning to object having this handler
- cleanup: use macros to access object internal vars
* zend_interfaces.c:
preserve ZEND_API in definition
* zend_interfaces.h:
declare as extern
2004-03-28 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_reflection_api.c:
Fix memleak found by Timm
2004-03-28 Stanislav Malyshev <stas@zend.com>
* zend_operators.c:
centralize object-to-scalar conversion, make it work with get handler
* zend.c:
try get handler on printable conversion
* zend_object_handlers.h:
some more clear comments
* zend_operators.c:
Use macros for object parts access
2004-03-28 Dmitry Stogov <dmitry@zend.com>
* zend_execute_API.c:
fix of fix related to __autoload. (ext/standard/tests/network/bug20134.phpt
passes again)
2004-03-27 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend.c:
Even though it is uncommented it should be right
2004-03-26 Marcus Boerger <marcus.boerger@post.rwth-aachen.de>
* zend_API.c
zend_compile.c:
Force destructors to have empty signatures
2004-03-26 Andi Gutmans <andi@zend.com>
* zend_execute.c:
- Fix build (thanks to Timm)
2004-03-25 Derick Rethans <php@derickrethans.nl>
* zend_language_scanner.l:
- Remove old and deprecated <?php_track_vars?> scanner token.
2004-03-25 Andi Gutmans <andi@zend.com>
* zend_compile.c:
- If __construct() is defined then it will always take precedence over
- old style constructors.
2004-03-25 Stanislav Malyshev <stas@zend.com>
* zend_execute.c:
no need to use result for RECV's - as in PHP4
* zend_execute.c:
Use get/set handlers for increment.decrement ops on objects
2004-03-25 Andi Gutmans <andi@zend.com>
* zend_execute_API.c:
/* The compiler is not-reentrant. Make sure we __autoload() only during
run-time
* (doesn't impact fuctionality of __autoload()
*/
2004-03-25 Dmitry Stogov <dmitry@zend.com>
* zend_execute_API.c:
Using ALLOC_HASHTABLE/FREE_HASHTABLE instead of emalloc/free.
2004-03-24 Dmitry Stogov <dmitry@zend.com>
* zend.c
zend_execute_API.c
zend_globals.h:
New autoload protection schema was implemented (Using HashTable instead of
boolean flag)
2004-03-24 Derick Rethans <php@derickrethans.nl>
* zend_operators.c:
- Revert bogus commit
* zend_operators.c:
- Fixed NEWS
2004-03-24 Dmitry Stogov <dmitry@zend.com>
* tests/bug27641.phpt:
Fixed bug #27641 (Object cloning in ze1_compatibility_mode was
reimplemented)
* zend_execute.c
zend_variables.c:
Object cloning in ze1 compatibility mode (zend.ze1_compatibility_mode) was
reimplemented (Dmitry, Andi)
2004-03-22 Andi Gutmans <andi@zend.com>
* zend_compile.c:
- Fix bug
* zend_execute.c:
- Remove whitespace
2004-03-21 Andi Gutmans <andi@zend.com>
* zend_execute.c:
- Improve consistency
2004-03-21 Stanislav Malyshev <stas@zend.com>
* zend_objects_API.c
zend_objects_API.h:
return zval *, to make it useful for read_property
* zend_objects_API.c:
update to new API
* zend_execute.c
zend_object_handlers.c
zend_object_handlers.h:
API change for read_property:
instead of bool silent it now gets fetch type
This can be used for creating proxy objects for write contexts
2004-03-21 Andi Gutmans <andi@zend.com>
* zend_execute.c:
- Nuke unused code
2004-03-18 Andi Gutmans <andi@zend.com>
* zend.h:
- Back to RC2-dev
2004-03-18 Zeev Suraski <zeev@zend.com>
* (php_5_0_0RC1)
zend.h:
Prepare to roll RC1
* (php_5_0_0RC1)
zend_execute.c:
Fix possible data corruption with __set()
2004-03-18 Stanislav Malyshev <stas@zend.com>
* zend_execute.c:
Improve error message - on E_STRICT, method is actually called,
so the error shouldn't say it cannot be called.
2004-03-18 Andi Gutmans <andi@zend.com>
* (php_5_0_0RC1)
zend_compile.c:
- Change redefinition of constructor from E_COMPILE_ERROR to E_STRICT.
* (php_5_0_0RC1)
ZEND_CHANGES:
- Update Changes
2004-03-17 Sascha Schumann <sascha@schumann.cx>
* zend_multiply.h:
Readd x86 implementation
2004-03-17 Andi Gutmans <andi@zend.com>
* (php_5_0_0RC1RC2)
zend_multiply.h:
- Improved patch for support multiplication on 64bit machines
* (php_5_0_0RC1RC2)
zend_execute.c:
- Fix tiny bug (one of the reasons we can't support __toString() for
- regular objects).
* (php_5_0_0RC1RC2)
zend.c:
- Stop make_printable_zval() from calling __toString()
* zend_execute.c:
- Fixed problem with __toString(). Due to the engine's architecture it is
- currently not possible to call __toString() anywhere besides print &
eval.
- Follow up will be on internals@
2004-03-17 Stanislav Malyshev <stas@zend.com>
* (php_5_0_0RC1RC2)
zend_compile.c:
fix typo
2004-03-17 Andi Gutmans <andi@zend.com>
* zend_multiply.h
zend_operators.c:
- Apply Ard's patch to support multiplication & overflow on both 32bit
and 64bit machines
2004-03-16 Derick Rethans <php@derickrethans.nl>
* zend.c
+1 -1
View File
@@ -51,7 +51,7 @@ write_property is used to directly write object's property by
name. This handler is used to assign property variables or to change them
in operations like += or ++ (unless get_property_zval_ptr is also set).
get_property_zval_ptr is used to obtain pointer to modifyable zval for
get_property_zval_ptr is used to obtain pointer to modifiable zval for
operations like += or ++. This should be used only if your object model
stores properties as real zval's that can be modified from outside.
Otherwise this handler should be NULL and the engine will use
+101 -101
View File
@@ -21,9 +21,9 @@ Changes in the Zend Engine 2.0
* $this
Unlike in Zend Engine 1 the pseudo variable $this cannot be
exchanged in Zend Engine 2. You can of course modify or work with
an object by using $this but you cannot replace $this with another
Unlike in Zend Engine 1 the pseudo variable $this cannot be
exchanged in Zend Engine 2. You can of course modify or work with
an object by using $this but you cannot replace $this with another
object to change the original object.
Example:
@@ -35,17 +35,17 @@ Changes in the Zend Engine 2.0
$this = $other;
}
}
$object = new Foo;
$object->prop = 'Hello';
$other = new Foo;
$other->prop = 'Bye';
$object->replace($other);
print $object->prop; // still shows 'Hello'
?>
Zend Engine 2.0 will issue a compile error, if an assignment
@@ -53,9 +53,9 @@ Changes in the Zend Engine 2.0
* Private and Protected Members.
The Zend Engine 2.0 introduces private and protected member
variables. Note that for performance reasons no error message is
emitted in case of an illegal access to a private or protectecd
The Zend Engine 2.0 introduces private and protected member
variables. Note that for performance reasons no error message is
emitted in case of an illegal access to a private or protectecd
member variable.
Example:
@@ -75,7 +75,7 @@ Changes in the Zend Engine 2.0
class MyClass2 extends MyClass {
protected $Foo;
function printHello() {
MyClass::printHello(); /* Should print */
print "MyClass2::printHello() " . $this->Hello; /* Shouldn't print out anything */
@@ -96,9 +96,9 @@ Changes in the Zend Engine 2.0
print $obj->Foo; /* Shouldn't print out anything */
$obj->printHello();
?>
Protected member variables can be accessed in classes extending the
class they are declared in, whereas private member variables can
Protected member variables can be accessed in classes extending the
class they are declared in, whereas private member variables can
only be accessed by the class they belong to.
* Private and protected methods.
@@ -130,14 +130,14 @@ Changes in the Zend Engine 2.0
$o->aPublicMethod();
?>
Old code that has no user-defined classes or functions named
Old code that has no user-defined classes or functions named
'public', 'protected' or 'private' should run without modifications.
* Abstract Classes and Methods.
The Zend Engine 2.0 introduces abstract classes and methods. An
abstract method only declares the method's signature and does not
provide an implementation. A class that contains abstract methods
The Zend Engine 2.0 introduces abstract classes and methods. An
abstract method only declares the method's signature and does not
provide an implementation. A class that contains abstract methods
needs to be declared abstract.
Example:
@@ -160,7 +160,7 @@ Changes in the Zend Engine 2.0
Classes that do not have abstract methods can be declared abstract
to prevent them from being instantiated.
Old code that has no user-defined classes or functions named
Old code that has no user-defined classes or functions named
'abstract' should run without modifications.
* Interfaces.
@@ -182,13 +182,13 @@ Changes in the Zend Engine 2.0
}
?>
Old code that has no user-defined classes or functions named
Old code that has no user-defined classes or functions named
'interface' or 'implements' should run without modifications.
An interface may extend one or more base interfaces (but not
An interface may extend one or more base interfaces (but not
implement them). Neither a class nor an interface can inherit
methods of the same name from different root interfaces.
methods of the same name from different root interfaces.
Interfaces may contain abstract static methods.
Example:
@@ -197,7 +197,7 @@ Changes in the Zend Engine 2.0
interface Printable {
function dump();
}
interface Streamable extends Printable {
function writeToStream();
static function readFromStream();
@@ -215,14 +215,14 @@ Changes in the Zend Engine 2.0
}
}
?>
A class that does not implement all interface methods must be
A class that does not implement all interface methods must be
declared as an abstract class.
* Class Type Hints.
While remaining loosely typed the Zend Engine 2.0 introduces the
ability to use class type hints to declare the expected class of
While remaining loosely typed the Zend Engine 2.0 introduces the
ability to use class type hints to declare the expected class of
objects that are passed as parameters to a method.
Example:
@@ -275,7 +275,7 @@ Changes in the Zend Engine 2.0
* Final methods and classes.
The Zend Engine 2.0 introduces the "final" keyword to declare
final methods. Those cannot be overridden by sub-classes.
final methods. Those cannot be overridden by sub-classes.
Example:
@@ -287,8 +287,8 @@ Changes in the Zend Engine 2.0
}
?>
It is furthermore possible to make a class final. Doing this
prevents a class from being specialized (it cannot be inherited
It is furthermore possible to make a class final. Doing this
prevents a class from being specialized (it cannot be inherited
by another class). There's no need to declare the methods of
a final class themselves as final.
@@ -304,7 +304,7 @@ Changes in the Zend Engine 2.0
Properties cannot be final. See per-class constants below.
Old code that has no user-defined classes or functions named
Old code that has no user-defined classes or functions named
'final' should run without modifications.
* Object Cloning.
@@ -339,9 +339,9 @@ Changes in the Zend Engine 2.0
all of the object's properties. If a __clone() method is
defined, then it will be responsible to set the necessary
properties in the created object. For convenience, the engine
ensures, that the clone will be initialized with all of the
properties from the source object, so that developers can start
with a by-value replica of the source object, and only override
ensures, that the clone will be initialized with all of the
properties from the source object, so that developers can start
with a by-value replica of the source object, and only override
properties that need to be changed.
Example:
@@ -374,7 +374,7 @@ Changes in the Zend Engine 2.0
print $obj_clone->name . "\n";
print $obj_clone->address . "\n";
?>
* Unified Constructors.
The Zend Engine allows developers to declare constructor methods
@@ -474,7 +474,7 @@ Changes in the Zend Engine 2.0
echo 'Foo::constant = ' . Foo::constant . "\n";
?>
Old code that has no user-defined classes or functions
Old code that has no user-defined classes or functions
named 'const' will run without modifications.
* Exceptions.
@@ -483,16 +483,16 @@ Changes in the Zend Engine 2.0
introduces a exception model similar to that of other programming
languages. But there is no catch all and no finally clause.
Old code that has no user-defined classes or functions 'catch',
Old code that has no user-defined classes or functions 'catch',
'throw' and 'try' will run without modifications.
Exceptions can be rethrown in catch blocks. Also it is possible to
have multiple catch blocks. In that case the caught exception is
have multiple catch blocks. In that case the caught exception is
compared with the classtype of each catch block from top to bottom
and the first block that has a 'instanceof' match gets executed.
When the catch block finishes execution continues at the end of
When the catch block finishes execution continues at the end of
the last catch block. If no catch block has a 'instanceof' match
then the next try/catch block is searched until no more try/catch
then the next try/catch block is searched until no more try/catch
blocks are available. In that case the exception is an uncaught
exception and the program terminates with showing the exception.
@@ -529,23 +529,23 @@ Changes in the Zend Engine 2.0
echo $exception;
}
?>
Even though the above example shows that it is possible to define
exception classes that don't inherit from Exception it is best to
do so. This is because the internal Exception class can gather a
lot of information otherwise not available. The PHP code emulation
code would look something like shown below. The comments show the
meaning of each property. As the code shows it is possible to read
meaning of each property. As the code shows it is possible to read
any available information by using the getter methods. But since
some of the methods are used internally they are marked final. All
in all the class is very restrictive because it must be ensured
some of the methods are used internally they are marked final. All
in all the class is very restrictive because it must be ensured
that anything used internally always works as expected.
Emulating class Exception:
<?php
class Exception {
function __construct(string $message=NULL, int $code=0) {
function __construct(/*string*/ $message=NULL, /*int*/ $code=0) {
if (func_num_args()) {
$this->message = $message;
}
@@ -555,15 +555,15 @@ Changes in the Zend Engine 2.0
$this->trace = debug_backtrace();
$this->string = StringFormat($this);
}
protected $message = 'Unknown exception'; // exception message
protected $message = 'Unknown exception'; // exception message
protected $code = 0; // user defined exception code
protected $file; // source filename of exception
protected $line; // source line of exception
private $trace; // backtrace of exception
private $string; // internal only!!
final function getMessage() {
return $this->message;
}
@@ -592,19 +592,19 @@ Changes in the Zend Engine 2.0
}
}
?>
If you derive your exception classes from this Exception base class
your exceptions will be nicely shown in the builtin handler for
your exceptions will be nicely shown in the builtin handler for
uncaught exceptions.
Note: The method getMessage() is a final read only access method to
Note: The method getMessage() is a final read only access method to
the private proeprty message that is set in the constructor. If you
feel a need to overwrite the exception display then overload method
__toString() in your derived class or implement your own extneral
__toString() in your derived class or implement your own extneral
exception display function to accomplish your desired formatting.
Example:
<?php
function display_exception(Exception $ex)
{
@@ -612,7 +612,7 @@ Changes in the Zend Engine 2.0
echo $ex->getTrace();
echo '</pre>';
}
try
{
// your code here
@@ -662,9 +662,9 @@ Changes in the Zend Engine 2.0
}
print foo::$my_static;
$obj = foo;
print $obj->my_prop;
?>
@@ -691,14 +691,14 @@ Changes in the Zend Engine 2.0
* instanceof.
New support for an instanceof operator which checks if an object
is of a certain class or interface type.
Example:
<?php
class Foo {
}
$obj = new Foo();
if ($obj instanceof Foo) {
print "Yay!\n";
@@ -720,9 +720,9 @@ Changes in the Zend Engine 2.0
* __autoload().
The __autoload() interceptor function will be automatically called
when an undeclared class is to be instantiated. The name of that
class will be passed to the __autoload() interceptor function as its
The __autoload() interceptor function will be automatically called
when an undeclared class is to be instantiated. The name of that
class will be passed to the __autoload() interceptor function as its
only argument. __autoload() must succeed in loading the class. If it
doesn't then an E_ERROR is emitted.
@@ -817,24 +817,24 @@ Changes in the Zend Engine 2.0
}
?>
Each class whose instances can be iterated with foreach should
Each class whose instances can be iterated with foreach should
implement the empty interface 'Traversable'. Hence any object
that says it implements 'Traversable' can be used with foreach.
The interfaces 'IteratorAggregate' and 'Iterator' allow to specify
how class objects are iterated in PHP code. The first of them simply
has a method 'getIterator' which must return an object that either
implements the interface 'Iterator' or is instantiated from an
has a method 'getIterator' which must return an object that either
implements the interface 'Iterator' or is instantiated from an
internal class that can be iterated.
Example:
<?php
class ObjectIterator implements Iterator {
private $obj;
private $num;
function __construct($obj) {
$this->obj = $obj;
}
@@ -859,23 +859,23 @@ Changes in the Zend Engine 2.0
$this->num++;
}
}
class Object implements IteratorAggregate {
public $max = 3;
function getIterator() {
return new ObjectIterator($this);
}
}
}
$obj = new Object;
// this foreach ...
foreach($obj as $key => $val) {
echo "$key = $val\n";
}
// matches the following 7 lines with the for directive.
$it = $obj->getIterator();
for($it->rewind(); $it->valid(); $it->next()) {
@@ -886,14 +886,14 @@ Changes in the Zend Engine 2.0
unset($it);
?>
The matching for directive is very intersting here since it shows
The matching for directive is very intersting here since it shows
the use of all abstract methods declared in the interfaces Iterator
and IteratorAggregate respectively.
* __METHOD__
The pseudo constant __METHOD__ shows the current class and method
when used inside a method and the function when used outside of a
The pseudo constant __METHOD__ shows the current class and method
when used inside a method and the function when used outside of a
class.
Example:
@@ -911,12 +911,12 @@ Changes in the Zend Engine 2.0
* __toString()
The magic method __toString() allows to overload the object to
string conversion. This conversion is only done automatically for
printing functions (echo, *printf) but not for other functions
The magic method __toString() allows to overload the object to
string conversion. This conversion is only done automatically for
the printing functions (echo, print) but not for other functions
that expect strings. Also the function __toString is not used in
places where objects are not allowed but strings are like array
indices. Note that specialized objects maybe converted to a string
indices. Note that specialized objects may be converted to a string
in any place but without calling __toString().
Example:
@@ -940,16 +940,16 @@ Changes in the Zend Engine 2.0
?>
* Reflection API
PHP5 comes with a complete reflection API that adds the ability to
PHP 5 comes with a complete Reflection API that adds the ability to
reverse-engineer classes, interfaces, functions and methods as well
as extensions.
The reflection API also offers ways of getting doc comments for
The Reflection API also offers ways of getting doc comments for
functions, classes and methods.
Nearly all aspects of object oriented code can be reflected by
using the reflection API which is documented separatley:
using the Reflection API which is documented separately:
http://sitten-polizei.de/php/reflection_api/docs/language.reflection.html
Example:
@@ -962,11 +962,11 @@ Changes in the Zend Engine 2.0
}
}
reflection_class::export('Foo');
reflection_object::export(new Foo);
reflection_method::export('Foo', 'func');
reflection_property::export('Foo', 'prop');
reflection_extension::export('standard');
ReflectionClass::export('Foo');
ReflectionObject::export(new Foo);
ReflectionMethod::export('Foo', 'func');
ReflectionProperty::export('Foo', 'prop');
ReflectionExtension::export('standard');
?>
* New memory manager
@@ -977,7 +977,7 @@ Changes in the Zend Engine 2.0
* Others
Probably other changes which we forgot to list. This list will be kept up-to-date
as much as possible.
Changes in the Zend Engine 1.0
-2
View File
@@ -68,8 +68,6 @@ int zend_sprintf(char *buffer, const char *format, ...);
#ifndef zend_isnan
#ifdef HAVE_ISNAN
#define zend_isnan(a) isnan(a)
#elif defined(NAN)
#define zend_isnan(a) (((a)==NAN)?1:0)
#elif defined(HAVE_FPCLASS)
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
#else
+42
View File
@@ -0,0 +1,42 @@
--TEST--
Bug #27641 (zend.ze1_compatibility_mode = On causes object properties to be misreported)
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?>
--FILE--
<?php
class A {
public $a = "Default for A";
public $b = "Default for B";
function __construct($a, $b) {
$this->a = $a;
$this->b = $b;
}
function A() {
$args = func_get_args();
call_user_func_array(Array(&$this, '__construct'), $args);
}
}
$t = new A("New A", "New B");
print_r($t);
print_r(get_class_vars(get_class($t)));
print_r(get_object_vars($t));
?>
--EXPECTF--
Strict Standards: Redefining already defined constructor for class A in %sbug27641.php on line %d
A Object
(
[a] => New A
[b] => New B
)
Array
(
[a] => Default for A
[b] => Default for B
)
Array
(
[a] => New A
[b] => New B
)
+10
View File
@@ -0,0 +1,10 @@
--TEST--
Bug #27731 (error_reporing() call inside @ block does not work correctly)
--FILE--
<?php
error_reporting(E_ALL ^ E_NOTICE);
@error_reporting(E_WARNING);
var_dump(error_reporting());
?>
--EXPECT--
int(2)
+31
View File
@@ -0,0 +1,31 @@
--TEST--
Bug #29505 (get_class_vars() severely broken when used with arrays)
--FILE--
<?php
class Test {
public $empty = array();
public $three = array(1, "b"=>"c", 3=>array());
}
var_dump(get_class_vars('Test'));
?>
===DONE===
--EXPECT--
array(2) {
["empty"]=>
array(0) {
}
["three"]=>
array(3) {
[0]=>
int(1)
["b"]=>
string(1) "c"
[3]=>
array(0) {
}
}
}
===DONE===
+28 -13
View File
@@ -218,16 +218,26 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
TSRMLS_FETCH();
#if 0
/* Standard PHP objects */
if (expr->value.obj.handlers == &std_object_handlers) {
if (Z_OBJ_HT_P(expr) == &std_object_handlers || !Z_OBJ_HT_P(expr)->cast_object) {
if (zend_std_cast_object_tostring(expr, expr_copy, IS_STRING, 0 TSRMLS_CC) == SUCCESS) {
break;
}
zend_error(E_NOTICE, "Object of class %s could not be converted to string", Z_OBJCE_P(expr)->name);
}
#endif
if (expr->value.obj.handlers->cast_object &&
expr->value.obj.handlers->cast_object(expr, expr_copy, IS_STRING, 0 TSRMLS_CC) == SUCCESS) {
break;
if (Z_OBJ_HANDLER_P(expr, cast_object)) {
if(Z_OBJ_HANDLER_P(expr, cast_object)(expr, expr_copy, IS_STRING, 0 TSRMLS_CC) == SUCCESS) {
break;
}
} else {
if(Z_OBJ_HANDLER_P(expr, get)) {
zval *z = Z_OBJ_HANDLER_P(expr, get)(expr TSRMLS_CC);
if(Z_TYPE_P(z) != IS_OBJECT) {
zend_make_printable_zval(z, expr_copy, use_copy);
FREE_ZVAL(z);
return;
}
}
}
if (EG(exception)) {
zval_dtor(expr_copy);
@@ -395,7 +405,7 @@ static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
static void register_standard_class(TSRMLS_D)
{
zend_standard_class_def = malloc(sizeof(zend_class_entry));
zend_standard_class_def = calloc(1, sizeof(zend_class_entry));
zend_standard_class_def->type = ZEND_INTERNAL_CLASS;
zend_standard_class_def->name_length = sizeof("stdClass") - 1;
@@ -419,7 +429,7 @@ static void zend_set_default_compile_time_values(TSRMLS_D)
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals TSRMLS_DC)
{
zend_function tmp_func;
zend_class_entry tmp_class;
zend_class_entry *tmp_class;
compiler_globals->compiled_filename = NULL;
@@ -429,7 +439,7 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals TSRMLS
compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry *));
zend_set_default_compile_time_values(TSRMLS_C);
@@ -467,8 +477,9 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals TSRMLS
EG(user_error_handler) = NULL;
EG(user_exception_handler) = NULL;
EG(in_execution) = 0;
EG(in_autoload) = 0;
EG(in_autoload) = NULL;
EG(current_execute_data) = NULL;
EG(current_module) = NULL;
}
@@ -501,8 +512,8 @@ static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
#endif
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
#if defined(__FreeBSD__) || defined(__DragonFly__)
/* FreeBSD and DragonFly floating point precision fix */
#include <floatingpoint.h>
#endif
@@ -543,8 +554,8 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
alloc_globals_ctor(&alloc_globals TSRMLS_CC);
#endif
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
#if defined(__FreeBSD__) || defined(__DragonFly__)
/* FreeBSD and DragonFly floating point precision fix */
fpsetmask(0);
#endif
@@ -570,6 +581,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
zend_compile_file = compile_file;
zend_execute = execute;
zend_execute_internal = NULL;
zend_throw_exception_hook = NULL;
zend_init_opcodes_handlers();
@@ -962,6 +974,9 @@ ZEND_API void zend_error(int type, const char *format, ...)
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC)==SUCCESS) {
if (retval) {
if (Z_TYPE_P(retval) == IS_BOOL && Z_LVAL_P(retval) == 0) {
zend_error_cb(type, error_filename, error_lineno, format, args);
}
zval_ptr_dtor(&retval);
}
} else {
@@ -1080,7 +1095,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
zval_ptr_dtor(EG(return_value_ptr_ptr));
local_retval = NULL;
}
} else if (!retval) {
} else if (!retval && *EG(return_value_ptr_ptr)) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
local_retval = NULL;
}
+4 -5
View File
@@ -22,7 +22,7 @@
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "2.0.0-dev"
#define ZEND_VERSION "2.0.1RC1"
#define ZEND_ENGINE_2
@@ -91,7 +91,7 @@ const char *zend_mh_bundle_error(void);
#endif /* HAVE_MACH_O_DYLD_H */
#if defined(HAVE_LIBDL)
#if defined(HAVE_LIBDL) && !defined(HAVE_MACH_O_DYLD_H)
# ifndef RTLD_LAZY
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
@@ -339,6 +339,8 @@ struct _zend_class_entry {
zend_uint line_end;
char *doc_comment;
zend_uint doc_comment_len;
struct _zend_module_entry *module;
};
#include "zend_stream.h"
@@ -393,9 +395,6 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
#define IS_CONSTANT 8
#define IS_CONSTANT_ARRAY 9
/* Special data type to temporarily mark large numbers */
#define FLAG_IS_BC 10 /* for parser internal use only */
/* Ugly hack to support constants as static array indices */
#define IS_CONSTANT_INDEX 0x80
+60 -23
View File
@@ -694,6 +694,11 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
zval *tmp;
zend_object *object;
if (class_type->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
char *what = class_type->ce_flags & ZEND_ACC_INTERFACE ? "interface" : "abstract class";
zend_error(E_ERROR, "Cannot instantiate %s %s", what, class_type->name);
}
if (!class_type->constants_updated) {
zend_hash_apply_with_argument(&class_type->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
zend_hash_apply_with_argument(class_type->static_members, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
@@ -1158,22 +1163,57 @@ ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *valu
return SUCCESS;
}
ZEND_API int zend_register_module_ex(zend_module_entry *module TSRMLS_DC)
{
int name_len;
char *lcname;
zend_module_entry *module_ptr;
if (!module) {
return FAILURE;
}
#if 0
zend_printf("%s: Registering module %d\n", module->name, module->module_number);
#endif
name_len = strlen(module->name);
lcname = zend_str_tolower_dup(module->name, name_len);
if (zend_hash_add(&module_registry, lcname, name_len+1, (void *)module, sizeof(zend_module_entry), (void**)&module_ptr)==FAILURE) {
zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name);
efree(lcname);
return FAILURE;
}
efree(lcname);
module = module_ptr;
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type TSRMLS_CC)==FAILURE) {
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
return FAILURE;
}
if (!module->module_started && module->module_startup_func) {
EG(current_module) = module;
if (module->module_startup_func(module->type, module->module_number TSRMLS_CC)==FAILURE) {
zend_error(E_CORE_ERROR,"Unable to start %s module", module->name);
EG(current_module) = NULL;
return FAILURE;
}
EG(current_module) = NULL;
}
module->module_started=1;
return SUCCESS;
}
ZEND_API int zend_startup_module(zend_module_entry *module)
{
if (module) {
module->module_number = zend_next_free_module();
if (module->module_startup_func) {
TSRMLS_FETCH();
TSRMLS_FETCH();
if (module->module_startup_func(MODULE_PERSISTENT, module->module_number TSRMLS_CC)==FAILURE) {
zend_error(E_CORE_ERROR,"Unable to start %s module", module->name);
return FAILURE;
}
}
module->type = MODULE_PERSISTENT;
zend_register_module(module);
}
return SUCCESS;
module->module_number = zend_next_free_module();
module->type = MODULE_PERSISTENT;
return zend_register_module_ex(module TSRMLS_CC);
}
@@ -1275,6 +1315,10 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
ctor = reg_function;
} else if (!strcmp(ptr->fname, ZEND_DESTRUCTOR_FUNC_NAME)) {
dtor = reg_function;
if (internal_function->num_args) {
zend_error(error_type, "Destructor %s::%s() cannot take arguments", scope->name, ptr->fname);
}
} else if (!strcmp(ptr->fname, ZEND_CLONE_FUNC_NAME)) {
clone = reg_function;
}
@@ -1351,16 +1395,8 @@ ZEND_API void zend_unregister_functions(zend_function_entry *functions, int coun
ZEND_API int zend_register_module(zend_module_entry *module)
{
TSRMLS_FETCH();
#if 0
zend_printf("%s: Registering module %d\n", module->name, module->module_number);
#endif
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type TSRMLS_CC)==FAILURE) {
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
return FAILURE;
}
module->module_started=1;
return zend_hash_add(&module_registry, module->name, strlen(module->name)+1, (void *)module, sizeof(zend_module_entry), NULL);
return zend_register_module_ex(module TSRMLS_CC);
}
@@ -1457,6 +1493,7 @@ static zend_class_entry *do_register_internal_class(zend_class_entry *orig_class
class_entry->type = ZEND_INTERNAL_CLASS;
zend_initialize_class_data(class_entry, 0 TSRMLS_CC);
class_entry->ce_flags = ce_flags;
class_entry->module = EG(current_module);
if (class_entry->builtin_functions) {
zend_register_functions(class_entry, class_entry->builtin_functions, &class_entry->function_table, MODULE_PERSISTENT TSRMLS_CC);
+3 -1
View File
@@ -53,7 +53,7 @@ typedef struct _zend_function_entry {
#define ZEND_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, 0)
#define ZEND_ME(classname, name, arg_info, flags) ZEND_FENTRY(name, ZEND_FN(classname##_##name), arg_info, flags)
#define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
#define ZEND_MALIAS(name, classname, alias, arg_info, flags) \
#define ZEND_MALIAS(classname, name, alias, arg_info, flags) \
ZEND_FENTRY(name, ZEND_FN(classname##_##alias), arg_info, flags)
#define ZEND_ME_MAPPING(name, func_name, arg_types) ZEND_NAMED_FE(name, ZEND_FN(func_name), arg_types)
@@ -135,6 +135,7 @@ typedef struct _zend_function_entry {
class_container.interfaces = NULL; \
class_container.get_iterator = NULL; \
class_container.iterator_funcs.funcs = NULL; \
class_container.module = NULL; \
}
int zend_next_free_module(void);
@@ -166,6 +167,7 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC,
ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC);
ZEND_API void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC);
ZEND_API int zend_register_module(zend_module_entry *module_entry);
ZEND_API int zend_register_module_ex(zend_module_entry *module TSRMLS_DC);
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry TSRMLS_DC);
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC);
+54 -52
View File
@@ -75,7 +75,7 @@ static long mem_block_end_magic = MEM_BLOCK_END_MAGIC;
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
if (AG(memory_limit)<AG(allocated_memory)) {\
int php_mem_limit = AG(memory_limit); \
if (AG(memory_limit)+1048576 > AG(allocated_memory) - rs) { \
if (EG(in_execution) && AG(memory_limit)+1048576 > AG(allocated_memory) - rs) { \
AG(memory_limit) = AG(allocated_memory) + 1048576; \
if (file) { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes)", php_mem_limit, file, lineno, s); \
@@ -99,6 +99,7 @@ static long mem_block_end_magic = MEM_BLOCK_END_MAGIC;
#endif
#if ZEND_DEBUG || !defined(ZEND_MM)
#define REMOVE_POINTER_FROM_LIST(p) \
if (p==AG(head)) { \
AG(head) = p->pNext; \
@@ -108,14 +109,21 @@ static long mem_block_end_magic = MEM_BLOCK_END_MAGIC;
if (p->pNext) { \
p->pNext->pLast = p->pLast; \
}
#else
#define REMOVE_POINTER_FROM_LIST(p)
#endif
#define ADD_POINTER_TO_LIST(p) \
#if ZEND_DEBUG || !defined(ZEND_MM)
#define ADD_POINTER_TO_LIST(p) \
p->pNext = AG(head); \
if (AG(head)) { \
AG(head)->pLast = p; \
} \
AG(head) = p; \
p->pLast = (zend_mem_header *) NULL;
#else
#define ADD_POINTER_TO_LIST(p)
#endif
#define DECLARE_CACHE_VARS() \
unsigned int real_size; \
@@ -164,6 +172,12 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
if (CACHE_INDEX<MAX_CACHED_MEMORY) {
AG(cache_stats)[CACHE_INDEX][0]++;
}
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size, SIZE);
if (AG(allocated_memory) > AG(allocated_memory_peak)) {
AG(allocated_memory_peak) = AG(allocated_memory);
}
#endif
p = (zend_mem_header *) ZEND_DO_MALLOC(sizeof(zend_mem_header) + MEM_HEADER_PADDING + SIZE + END_MAGIC_SIZE);
#if !ZEND_DISABLE_MEMORY_CACHE
@@ -183,9 +197,7 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
return (void *)p;
}
p->cached = 0;
#if ZEND_DEBUG || !defined(ZEND_MM)
ADD_POINTER_TO_LIST(p);
#endif
p->size = size; /* Save real size for correct cache output */
#if ZEND_DEBUG
p->filename = __zend_filename;
@@ -199,12 +211,6 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
# endif
memcpy((((char *) p) + sizeof(zend_mem_header) + MEM_HEADER_PADDING + size), &mem_block_end_magic, sizeof(long));
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size, SIZE);
if (AG(allocated_memory) > AG(allocated_memory_peak)) {
AG(allocated_memory_peak) = AG(allocated_memory);
}
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + MEM_HEADER_PADDING);
@@ -272,9 +278,7 @@ ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
}
#endif
HANDLE_BLOCK_INTERRUPTIONS();
#if ZEND_DEBUG || !defined(ZEND_MM)
REMOVE_POINTER_FROM_LIST(p);
#endif
#if MEMORY_LIMIT
AG(allocated_memory) -= SIZE;
@@ -331,9 +335,13 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
HANDLE_BLOCK_INTERRUPTIONS();
#if ZEND_DEBUG || !defined(ZEND_MM)
REMOVE_POINTER_FROM_LIST(p);
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size - p->size, SIZE - REAL_SIZE(p->size));
if (AG(allocated_memory) > AG(allocated_memory_peak)) {
AG(allocated_memory_peak) = AG(allocated_memory);
}
#endif
REMOVE_POINTER_FROM_LIST(p);
p = (zend_mem_header *) ZEND_DO_REALLOC(p, sizeof(zend_mem_header)+MEM_HEADER_PADDING+SIZE+END_MAGIC_SIZE);
if (!p) {
if (!allow_failure) {
@@ -344,27 +352,17 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
exit(1);
#endif
}
#if ZEND_DEBUG || !defined(ZEND_MM)
ADD_POINTER_TO_LIST(orig);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)NULL;
}
#if ZEND_DEBUG || !defined(ZEND_MM)
ADD_POINTER_TO_LIST(p);
#endif
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
memcpy((((char *) p) + sizeof(zend_mem_header) + MEM_HEADER_PADDING + size), &mem_block_end_magic, sizeof(long));
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size - p->size, SIZE - REAL_SIZE(p->size));
if (AG(allocated_memory) > AG(allocated_memory_peak)) {
AG(allocated_memory_peak) = AG(allocated_memory);
}
#endif
p->size = size;
@@ -468,7 +466,7 @@ ZEND_API void start_memory_manager(TSRMLS_D)
}
ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC)
ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC)
{
#if ZEND_DEBUG || !defined(ZEND_MM)
zend_mem_header *p, *t;
@@ -477,13 +475,35 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC)
zend_uint grand_total_leaks=0;
#endif
#if !ZEND_DISABLE_MEMORY_CACHE
/* Free memory cache even on partial shutdown to avoid fragmentation */
if (1 || full_shutdown) {
unsigned int i, j;
zend_mem_header *ptr;
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
ptr = (zend_mem_header *) AG(cache)[i][j];
# if MEMORY_LIMIT
AG(allocated_memory) -= REAL_SIZE(ptr->size);
# endif
REMOVE_POINTER_FROM_LIST(ptr);
ZEND_DO_FREE(ptr);
}
AG(cache_count)[i] = 0;
}
}
#endif /* !ZEND_DISABLE_MEMORY_CACHE */
#if defined(ZEND_MM) && !ZEND_DEBUG
if (clean_cache) {
zend_mm_shutdown(&AG(mm_heap));
zend_mm_shutdown(&AG(mm_heap));
if (full_shutdown) {
return;
}
zend_mm_startup(&AG(mm_heap), 256*1024);
#elif defined(ZEND_WIN32) && !ZEND_DEBUG
if (clean_cache && AG(memory_heap)) {
if (full_shutdown && AG(memory_heap)) {
HeapDestroy(AG(memory_heap));
return;
}
@@ -506,32 +526,13 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC)
}
#endif /* ZEND_ENABLE_FAST_CACHE */
#if !ZEND_DISABLE_MEMORY_CACHE && !defined(ZEND_MM)
if (1 || clean_cache) {
unsigned int i, j;
zend_mem_header *ptr;
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
ptr = (zend_mem_header *) AG(cache)[i][j];
#if MEMORY_LIMIT
AG(allocated_memory) -= REAL_SIZE(ptr->size);
#endif
REMOVE_POINTER_FROM_LIST(ptr);
ZEND_DO_FREE(ptr);
}
AG(cache_count)[i] = 0;
}
}
#endif /* !ZEND_DISABLE_MEMORY_CACHE */
#if ZEND_DEBUG || !defined(ZEND_MM)
p = AG(head);
t = AG(head);
while (t) {
if (!t->cached) {
#if ZEND_DEBUG
if (!t->cached && !t->reported) {
if (!t->reported) {
zend_mem_header *iterator;
int total_leak=0, total_leak_count=0;
@@ -584,7 +585,7 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC)
zval display_memory_cache_stats;
int i, j;
if (clean_cache) {
if (full_shutdown) {
/* we're shutting down completely, don't even touch the INI subsystem */
break;
}
@@ -622,12 +623,13 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC)
#endif
#if defined(ZEND_MM) && ZEND_DEBUG
if (clean_cache) {
zend_mm_shutdown(&AG(mm_heap));
zend_mm_shutdown(&AG(mm_heap));
if (full_shutdown) {
return;
}
zend_mm_startup(&AG(mm_heap), 256*1024);
#elif defined(ZEND_WIN32) && ZEND_DEBUG
if (clean_cache && AG(memory_heap)) {
if (full_shutdown && AG(memory_heap)) {
HeapDestroy(AG(memory_heap));
return;
}
+1 -1
View File
@@ -126,7 +126,7 @@ ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZE
ZEND_API int zend_set_memory_limit(unsigned int memory_limit);
ZEND_API void start_memory_manager(TSRMLS_D);
ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC);
ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC);
#if ZEND_DEBUG
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+80 -24
View File
@@ -661,7 +661,6 @@ ZEND_FUNCTION(get_class_vars)
{
zval **class_name;
zend_class_entry *ce, **pce;
zval *tmp;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
@@ -674,11 +673,41 @@ ZEND_FUNCTION(get_class_vars)
} else {
ce = *pce;
array_init(return_value);
if (!ce->constants_updated) {
zend_hash_apply_with_argument(&ce->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
ce->constants_updated = 1;
if (zend_hash_num_elements(&ce->default_properties) > 0) {
HashPosition pos;
zval **prop;
zend_hash_internal_pointer_reset_ex(&ce->default_properties, &pos);
while (zend_hash_get_current_data_ex(&ce->default_properties, (void **) &prop, &pos) == SUCCESS) {
char *key, *class_name, *prop_name;
uint key_len;
ulong num_index;
zval *prop_copy;
zend_hash_get_current_key_ex(&ce->default_properties, &key, &key_len, &num_index, 0, &pos);
zend_hash_move_forward_ex(&ce->default_properties, &pos);
zend_unmangle_property_name(key, &class_name, &prop_name);
if (class_name && class_name[0] != '*' && strcmp(class_name, ce->name)) {
/* filter privates from base classes */
continue;
}
/* copy: enforce read only access */
ALLOC_ZVAL(prop_copy);
*prop_copy = **prop;
zval_copy_ctor(prop_copy);
INIT_PZVAL(prop_copy);
/* this is necessary to make it able to work with default array
* properties, returned to user */
if (Z_TYPE_P(prop_copy) == IS_CONSTANT_ARRAY || Z_TYPE_P(prop_copy) == IS_CONSTANT) {
zval_update_constant(&prop_copy, 0 TSRMLS_CC);
}
add_assoc_zval(return_value, prop_name, prop_copy);
}
}
zend_hash_copy(return_value->value.ht, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
}
/* }}} */
@@ -799,20 +828,30 @@ ZEND_FUNCTION(method_exists)
}
/* }}} */
/* {{{ proto bool class_exists(string classname)
/* {{{ proto bool class_exists(string classname [, bool autoload])
Checks if the class exists */
ZEND_FUNCTION(class_exists)
{
zval **class_name;
char *class_name, *lc_name;
zend_class_entry **ce;
int class_name_len;
zend_bool autoload = 1;
int found;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &class_name, &class_name_len, &autoload) == FAILURE) {
return;
}
convert_to_string_ex(class_name);
if (!autoload) {
lc_name = do_alloca(class_name_len + 1);
zend_str_tolower_copy(lc_name, class_name, class_name_len);
found = zend_hash_find(EG(class_table), lc_name, class_name_len+1, (void **) &ce);
free_alloca(lc_name);
RETURN_BOOL(found == SUCCESS);
}
if (zend_lookup_class(Z_STRVAL_PP(class_name), Z_STRLEN_PP(class_name), &ce TSRMLS_CC) == SUCCESS) {
if (zend_lookup_class(class_name, class_name_len, &ce TSRMLS_CC) == SUCCESS) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -950,7 +989,7 @@ ZEND_FUNCTION(set_error_handler)
zval *error_handler;
zend_bool had_orig_error_handler=0;
char *error_handler_name = NULL;
long error_type = E_ALL;
long error_type = E_ALL | E_STRICT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|l", &error_handler, &error_type) == FAILURE) {
return;
@@ -995,8 +1034,12 @@ ZEND_FUNCTION(set_error_handler)
ZEND_FUNCTION(restore_error_handler)
{
if (EG(user_error_handler)) {
zval_ptr_dtor(&EG(user_error_handler));
zval *zeh = EG(user_error_handler);
EG(user_error_handler) = NULL;
zval_ptr_dtor(&zeh);
}
if (zend_ptr_stack_num_elements(&EG(user_error_handlers))==0) {
EG(user_error_handler) = NULL;
} else {
@@ -1009,18 +1052,26 @@ ZEND_FUNCTION(restore_error_handler)
/* }}} */
/* {{{ proto string set_exception_handler(string exception_handler)
/* {{{ proto string set_exception_handler(callable exception_handler)
Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error */
ZEND_FUNCTION(set_exception_handler)
{
zval **exception_handler;
char *exception_handler_name = NULL;
zend_bool had_orig_exception_handler=0;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &exception_handler)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(exception_handler);
if (!zend_is_callable(*exception_handler, 0, &exception_handler_name)) {
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
get_active_function_name(TSRMLS_C), exception_handler_name?exception_handler_name:"unknown");
efree(exception_handler_name);
return;
}
efree(exception_handler_name);
if (EG(user_exception_handler)) {
had_orig_exception_handler = 1;
*return_value = *EG(user_exception_handler);
@@ -1439,14 +1490,14 @@ ZEND_FUNCTION(debug_print_backtrace)
ZEND_WRONG_PARAM_COUNT();
}
while (--args >= EG(argument_stack).elements) {
while (--args > EG(argument_stack).elements) {
if (*args--) {
break;
}
args -= *(ulong*)args;
frames_on_stack++;
if (args == EG(argument_stack).elements) {
if ((args-1) == EG(argument_stack).elements) {
arg_stack_consistent = 1;
break;
}
@@ -1462,6 +1513,7 @@ ZEND_FUNCTION(debug_print_backtrace)
array_init(return_value);
while (ptr) {
class_name = call_type = NULL;
if (ptr->op_array) {
filename = ptr->op_array->filename;
lineno = ptr->opline->lineno;
@@ -1559,14 +1611,14 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML
int arg_stack_consistent = 0;
int frames_on_stack = 0;
while (--args >= EG(argument_stack).elements) {
while (--args > EG(argument_stack).elements) {
if (*args--) {
break;
}
args -= *(ulong*)args;
frames_on_stack++;
if (args == EG(argument_stack).elements) {
if ((args-1) == EG(argument_stack).elements) {
arg_stack_consistent = 1;
break;
}
@@ -1576,8 +1628,9 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML
/* skip debug_backtrace() */
ptr = ptr->prev_execute_data;
if (skip_last) {
cur_arg_pos -= 2;
if (skip_last--) {
int arg_count = *((ulong*)(cur_arg_pos - 2));
cur_arg_pos -= (arg_count + 2);
frames_on_stack--;
}
@@ -1700,17 +1753,20 @@ ZEND_FUNCTION(debug_backtrace)
ZEND_FUNCTION(extension_loaded)
{
zval **extension_name;
char *lcname;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &extension_name)) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(extension_name);
if (zend_hash_exists(&module_registry, Z_STRVAL_PP(extension_name), Z_STRLEN_PP(extension_name)+1)) {
RETURN_TRUE;
lcname = zend_str_tolower_dup(Z_STRVAL_PP(extension_name), Z_STRLEN_PP(extension_name));
if (zend_hash_exists(&module_registry, lcname, Z_STRLEN_PP(extension_name)+1)) {
RETVAL_TRUE;
} else {
RETURN_FALSE;
RETVAL_FALSE;
}
efree(lcname);
}
/* }}} */
+52 -17
View File
@@ -997,13 +997,14 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
/* Improve after RC: cache the lowercase class name */
if ((short_class_name_length == name_len) && (!memcmp(short_class_name, lcname, name_len))) {
if(CG(active_class_entry)->constructor) {
zend_error(E_COMPILE_ERROR, "Cannot redefine constructor for class %s", CG(active_class_entry)->name);
if (CG(active_class_entry)->constructor) {
zend_error(E_STRICT, "Redefining already defined constructor for class %s", CG(active_class_entry)->name);
} else {
CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
}
CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
} else if ((name_len == sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)))) {
if(CG(active_class_entry)->constructor) {
zend_error(E_COMPILE_ERROR, "Cannot redefine constructor for class %s", CG(active_class_entry)->name);
if (CG(active_class_entry)->constructor) {
zend_error(E_STRICT, "Redefining already defined constructor for class %s", CG(active_class_entry)->name);
}
CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
} else if ((name_len == sizeof(ZEND_DESTRUCTOR_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_DESTRUCTOR_FUNC_NAME, sizeof(ZEND_DESTRUCTOR_FUNC_NAME)))) {
@@ -1086,16 +1087,37 @@ void zend_do_handle_exception(TSRMLS_D)
void zend_do_end_function_declaration(znode *function_token TSRMLS_DC)
{
char lcname[16];
int name_len;
zend_do_extended_info(TSRMLS_C);
zend_do_return(NULL, 0 TSRMLS_CC);
zend_do_handle_exception(TSRMLS_C);
pass_two(CG(active_op_array) TSRMLS_CC);
if (CG(active_class_entry)
&& !strcmp(CG(active_op_array)->function_name, ZEND_CLONE_FUNC_NAME)
&& CG(active_op_array)->num_args != 0) {
zend_error(E_COMPILE_ERROR, "The clone method cannot accept any arguments");
/* we don't care if the function name is longer, in fact lowercasing only
* the beginning of the name speeds up the check process */
name_len = strlen(CG(active_op_array)->function_name);
zend_str_tolower_copy(lcname, CG(active_op_array)->function_name, MIN(name_len, sizeof(lcname)-1));
lcname[sizeof(lcname)-1] = '\0'; // zend_str_tolower_copy won't necessarily set the zero byte
if (CG(active_class_entry)) {
if (name_len == sizeof(ZEND_DESTRUCTOR_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_DESTRUCTOR_FUNC_NAME, sizeof(ZEND_DESTRUCTOR_FUNC_NAME)) && CG(active_op_array)->num_args != 0) {
zend_error(E_COMPILE_ERROR, "Destuctor %s::%s() cannot take arguments", CG(active_class_entry)->name, ZEND_DESTRUCTOR_FUNC_NAME);
} else if (name_len == sizeof(ZEND_CLONE_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME)) && CG(active_op_array)->num_args != 0) {
zend_error(E_COMPILE_ERROR, "Method %s::%s() cannot accept any arguments", CG(active_class_entry)->name, ZEND_CLONE_FUNC_NAME);
} else if (name_len == sizeof(ZEND_GET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME)) && CG(active_op_array)->num_args != 1) {
zend_error(E_COMPILE_ERROR, "Method %s::%s() must take exactly 1 argument", CG(active_class_entry)->name, ZEND_GET_FUNC_NAME);
} else if (name_len == sizeof(ZEND_SET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME)) && CG(active_op_array)->num_args != 2) {
zend_error(E_COMPILE_ERROR, "Method %s::%s() must take exactly 2 arguments", CG(active_class_entry)->name, ZEND_SET_FUNC_NAME);
} else if (name_len == sizeof(ZEND_CALL_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)) && CG(active_op_array)->num_args != 2) {
zend_error(E_COMPILE_ERROR, "Method %s::%s() must take exactly 2 arguments", CG(active_class_entry)->name, ZEND_CALL_FUNC_NAME);
}
} else {
if (name_len == sizeof(ZEND_AUTOLOAD_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME)) && CG(active_op_array)->num_args != 1) {
zend_error(E_COMPILE_ERROR, "%s() must take exactly 1 argument", ZEND_AUTOLOAD_FUNC_NAME);
}
}
CG(active_op_array)->line_end = zend_get_compiled_lineno(TSRMLS_C);
@@ -1133,6 +1155,7 @@ void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initia
if (class_type->op_type != IS_UNUSED) {
cur_arg_info->class_name = class_type->u.constant.value.str.val;
cur_arg_info->class_name_len = class_type->u.constant.value.str.len;
cur_arg_info->allow_null = 0;
} else {
cur_arg_info->class_name = NULL;
cur_arg_info->class_name_len = 0;
@@ -1706,16 +1729,20 @@ static void do_inherit_method(zend_function *function)
}
static zend_bool zend_do_perform_implementation_check(zend_function *fe)
static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_function *proto)
{
zend_uint i;
zend_function *proto = fe->common.prototype;
/* If it's a user function then arg_info == NULL means we don't have any parameters but we still need to do the arg number checks. We are only willing to ignore this for internal functions because extensions don't always define arg_info. */
if (!proto || (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION)) {
return 1;
}
/* No implementation checks for constructors */
if (fe->common.fn_flags & ZEND_ACC_CTOR) {
return 1;
}
/* check number of arguments */
if (proto->common.required_num_args != fe->common.required_num_args
|| proto->common.num_args > fe->common.num_args) {
@@ -1813,15 +1840,21 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f
}
}
child->common.prototype = parent;
if (parent_flags & ZEND_ACC_ABSTRACT) {
child->common.fn_flags |= ZEND_ACC_IMPLEMENTED_ABSTRACT;
child->common.prototype = parent;
} else {
child->common.prototype = parent->common.prototype;
}
/* Check E_STRICT before the check so that we save some time */
if(EG(error_reporting) & E_STRICT) {
if (!(child->common.fn_flags & ZEND_ACC_CTOR) && !zend_do_perform_implementation_check(child)) {
zend_error(E_STRICT, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
if (child->common.prototype) {
if (!zend_do_perform_implementation_check(child, child->common.prototype)) {
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
}
} else if (EG(error_reporting) & E_STRICT) { /* Check E_STRICT before the check so that we save some time */
if (!zend_do_perform_implementation_check(child, parent)) {
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
}
}
@@ -2519,6 +2552,7 @@ static void do_verify_abstract_class(TSRMLS_D)
opline->opcode = ZEND_VERIFY_ABSTRACT_CLASS;
opline->op1 = CG(implementing_class);
SET_UNUSED(opline->op2);
}
@@ -3317,7 +3351,7 @@ void zend_do_foreach_cont(znode *value, znode *key, znode *as_token, znode *fore
value = tmp;
}
if (key->u.EA.type & ZEND_PARSED_REFERENCE_VARIABLE) {
if ((key->op_type != IS_UNUSED) && (key->u.EA.type & ZEND_PARSED_REFERENCE_VARIABLE)) {
zend_error(E_COMPILE_ERROR, "Key element cannot be a reference");
}
@@ -3729,6 +3763,7 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify
ce->parent = NULL;
ce->num_interfaces = 0;
ce->interfaces = NULL;
ce->module = NULL;
}
}
+3 -1
View File
@@ -494,13 +494,14 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC);
ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC);
ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC);
ZEND_API void zend_function_dtor(zend_function *function);
ZEND_API void destroy_zend_class(zend_class_entry **pce);
void zend_class_add_ref(zend_class_entry **ce);
ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, char *src1, int src1_length, char *src2, int src2_length, int internal);
ZEND_API void zend_unmangle_property_name(char *mangled_property, char **prop_name, char **class_name);
#define ZEND_FUNCTION_DTOR (void (*)(void *)) destroy_zend_function
#define ZEND_FUNCTION_DTOR (void (*)(void *)) zend_function_dtor
#define ZEND_CLASS_DTOR (void (*)(void *)) destroy_zend_class
zend_op *get_next_op(zend_op_array *op_array TSRMLS_DC);
@@ -839,6 +840,7 @@ END_EXTERN_C()
#define ZEND_GET_FUNC_NAME "__get"
#define ZEND_SET_FUNC_NAME "__set"
#define ZEND_CALL_FUNC_NAME "__call"
#define ZEND_AUTOLOAD_FUNC_NAME "__autoload"
#endif /* ZEND_COMPILE_H */
+17 -18
View File
@@ -231,10 +231,8 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
scope = CG(active_class_entry);
}
class_name = do_alloca(class_name_len+1);
memcpy(class_name, name, class_name_len);
class_name[class_name_len] = '\0';
class_name = estrndup(name, class_name_len);
if (class_name_len == sizeof("self")-1 && strcmp(class_name, "self") == 0) {
if (scope) {
ce = &scope;
@@ -255,7 +253,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
retval = 0;
}
}
free_alloca(class_name);
efree(class_name);
if (retval && ce) {
if (zend_hash_find(&((*ce)->constants_table), constant_name, const_name_len+1, (void **) &ret_constant) != SUCCESS) {
@@ -275,9 +273,8 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
}
if (zend_hash_find(EG(zend_constants), name, name_len+1, (void **) &c) == FAILURE) {
lookup_name = do_alloca(name_len+1);
zend_str_tolower_copy(lookup_name, name, name_len);
lookup_name[name_len] = '\0';
lookup_name = estrndup(name, name_len);
zend_str_tolower(lookup_name, name_len);
if (zend_hash_find(EG(zend_constants), lookup_name, name_len+1, (void **) &c)==SUCCESS) {
if ((c->flags & CONST_CS) && memcmp(c->name, name, name_len)!=0) {
@@ -286,7 +283,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
} else {
retval=0;
}
free_alloca(lookup_name);
efree(lookup_name);
}
if (retval) {
@@ -302,7 +299,8 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC
ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
{
char *lowercase_name;
char *lowercase_name = NULL;
char *name;
int ret = SUCCESS;
#if 0
@@ -311,23 +309,24 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
if (!(c->flags & CONST_CS)) {
/* keep in mind that c->name_len already contains the '\0' */
lowercase_name = do_alloca(c->name_len);
zend_str_tolower_copy(lowercase_name, c->name, c->name_len - 1);
lowercase_name = estrndup(c->name, c->name_len);
zend_str_tolower(lowercase_name, c->name_len);
name = lowercase_name;
} else {
lowercase_name = do_alloca(c->name_len + 1);
memcpy(lowercase_name, c->name, c->name_len);
lowercase_name[c->name_len] = '\0';
name = c->name;
}
if (zend_hash_add(EG(zend_constants), lowercase_name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
if (zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
zend_error(E_NOTICE,"Constant %s already defined", name);
free(c->name);
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
zend_error(E_NOTICE,"Constant %s already defined", lowercase_name);
ret = FAILURE;
}
free_alloca(lowercase_name);
if (lowercase_name) {
efree(lowercase_name);
}
return ret;
}
+1 -1
View File
@@ -30,7 +30,7 @@ typedef struct _dynamic_array {
} dynamic_array;
BEGIN_EXTERN_C()
ZEND_API int zend_dynamic_array_init(dynamic_array *da);
ZEND_API int zend_dynamic_array_init(dynamic_array *da, unsigned int element_size, unsigned int size);
ZEND_API void *zend_dynamic_array_push(dynamic_array *da);
ZEND_API void *zend_dynamic_array_pop(dynamic_array *da);
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index);
+6 -1
View File
@@ -30,6 +30,7 @@
zend_class_entry *default_exception_ce;
static zend_object_handlers default_exception_handlers;
ZEND_API void zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC);
ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);
void zend_throw_exception_internal(zval *exception TSRMLS_DC)
@@ -45,6 +46,10 @@ void zend_throw_exception_internal(zval *exception TSRMLS_DC)
zend_error(E_ERROR, "Exception thrown without a stack frame");
}
if (zend_throw_exception_hook) {
zend_throw_exception_hook(exception TSRMLS_CC);
}
if ((EG(current_execute_data)->opline+1)->opcode == ZEND_HANDLE_EXCEPTION) {
/* no need to rethrow the exception */
return;
@@ -439,7 +444,7 @@ void zend_register_default_exception(TSRMLS_D)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "exception", default_exception_functions);
INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions);
default_exception_ce = zend_register_internal_class(&ce TSRMLS_CC);
default_exception_ce->create_object = zend_default_exception_new;
memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+2
View File
@@ -40,6 +40,8 @@ ZEND_API void zend_throw_exception_ex(zend_class_entry *exception_ce, long code
ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC);
ZEND_API void zend_clear_exception(TSRMLS_D);
extern ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);
/* show an exception using zend_error(E_ERROR,...) */
ZEND_API void zend_exception_error(zval *exception TSRMLS_DC);
+176 -112
View File
@@ -52,6 +52,7 @@ static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_
#define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset))
#define T(offset) (*(temp_variable *)((char *) Ts + offset))
#define TEMP_VAR_STACK_LIMIT 2000
/* former zend_execute_locks.h */
static inline void zend_pzval_lock_func(zval *z)
@@ -178,7 +179,7 @@ static inline void zend_fetch_property_address_inner(zval *object, znode *op2, z
}
T(result->u.var).var.ptr_ptr = ptr_ptr;
} else if (Z_OBJ_HT_P(object)->read_property) {
T(result->u.var).var.ptr = Z_OBJ_HT_P(object)->read_property(object, prop_ptr, 0 TSRMLS_CC);
T(result->u.var).var.ptr = Z_OBJ_HT_P(object)->read_property(object, prop_ptr, BP_VAR_W TSRMLS_CC);
T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr;
} else {
zend_error(E_WARNING, "This object doesn't support property references");
@@ -382,13 +383,21 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode
}
/* here we are sure we are dealing with an object */
if (EG(ze1_compatibility_mode)) {
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
object = *object_ptr;
}
/* separate our value if necessary */
if (value_op->op_type == IS_TMP_VAR) {
if (EG(ze1_compatibility_mode) && Z_TYPE_P(value) == IS_OBJECT) {
zval *orig_value = value;
ALLOC_ZVAL(value);
*value = *orig_value;
value->is_ref = 0;
value->refcount = 0;
if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) {
zend_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_P(orig_value)->name);
}
zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", Z_OBJCE_P(orig_value)->name);
value->value.obj = Z_OBJ_HANDLER_P(orig_value, clone_obj)(orig_value TSRMLS_CC);
} else if (value_op->op_type == IS_TMP_VAR) {
zval *orig_value = value;
ALLOC_ZVAL(value);
@@ -404,6 +413,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode
value->refcount = 0;
zval_copy_ctor(value);
}
value->refcount++;
if (opcode == ZEND_ASSIGN_OBJ) {
@@ -434,14 +444,14 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode
}
Z_OBJ_HT_P(object)->write_dimension(object, property_name, value TSRMLS_CC);
}
zval_ptr_dtor(&value);
FREE_OP(Ts, op2, EG(free_op2));
if (result) {
T(result->u.var).var.ptr = value;
T(result->u.var).var.ptr_ptr = NULL; /* see if we can remove this */
T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr; /* this is so that we could use it in FETCH_DIM_R, etc. - see bug #27876 */
SELECTIVE_PZVAL_LOCK(value, result);
}
zval_ptr_dtor(&value);
}
@@ -542,12 +552,53 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
}
return;
}
if(Z_TYPE_P(variable_ptr) == IS_OBJECT && Z_OBJ_HANDLER_P(variable_ptr, set)) {
/* TODO? ze1_compatibility_mode support */
Z_OBJ_HANDLER_P(variable_ptr, set)(variable_ptr_ptr, value TSRMLS_CC);
goto done_setting_var;
}
if (PZVAL_IS_REF(variable_ptr)) {
if (EG(ze1_compatibility_mode) && Z_TYPE_P(value) == IS_OBJECT) {
if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) {
zend_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_P(value)->name);
} else if (PZVAL_IS_REF(variable_ptr)) {
if (variable_ptr != value) {
zend_uint refcount = variable_ptr->refcount;
zval garbage;
if (type != IS_TMP_VAR) {
value->refcount++;
}
garbage = *variable_ptr;
*variable_ptr = *value;
variable_ptr->refcount = refcount;
variable_ptr->is_ref = 1;
zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", Z_OBJCE_P(value)->name);
variable_ptr->value.obj = Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC);
if (type != IS_TMP_VAR) {
value->refcount--;
}
zendi_zval_dtor(garbage);
}
} else {
variable_ptr->refcount--;
if (variable_ptr->refcount == 0) {
zendi_zval_dtor(*variable_ptr);
} else {
ALLOC_ZVAL(variable_ptr);
*variable_ptr_ptr = variable_ptr;
}
*variable_ptr = *value;
INIT_PZVAL(variable_ptr);
zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", Z_OBJCE_P(value)->name);
variable_ptr->value.obj = Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC);
}
} else if (PZVAL_IS_REF(variable_ptr)) {
if (variable_ptr!=value) {
zend_uint refcount = variable_ptr->refcount;
zval garbage;
if (type!=IS_TMP_VAR) {
value->refcount++;
}
@@ -572,7 +623,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
variable_ptr->refcount++;
} else if (PZVAL_IS_REF(value)) {
zval tmp;
tmp = *value;
zval_copy_ctor(&tmp);
tmp.refcount=1;
@@ -590,8 +641,8 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
value->refcount=1;
*variable_ptr = *value;
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
EMPTY_SWITCH_DEFAULT_CASE()
}
} else { /* we need to split */
switch (type) {
case IS_VAR:
@@ -613,11 +664,13 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
value->refcount=1;
**variable_ptr_ptr = *value;
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
EMPTY_SWITCH_DEFAULT_CASE()
}
}
(*variable_ptr_ptr)->is_ref=0;
}
done_setting_var:
if (result) {
T(result->u.var).var.ptr_ptr = variable_ptr_ptr;
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
@@ -787,8 +840,10 @@ fetch_string_dim:
}
}
break;
case IS_DOUBLE:
case IS_RESOURCE:
zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", dim->value.lval, dim->value.lval);
/* Fall Through */
case IS_DOUBLE:
case IS_BOOL:
case IS_LONG: {
long index;
@@ -1058,7 +1113,7 @@ static void zend_fetch_property_address_read(znode *result, znode *op1, znode *o
{
zval *container;
zval **retval;
retval = &T(result->u.var).var.ptr;
T(result->u.var).var.ptr_ptr = retval;
@@ -1070,7 +1125,7 @@ static void zend_fetch_property_address_read(znode *result, znode *op1, znode *o
return;
}
if (container->type != IS_OBJECT) {
zend_error(E_NOTICE, "Trying to get property of non-object");
@@ -1082,7 +1137,7 @@ static void zend_fetch_property_address_read(znode *result, znode *op1, znode *o
} else {
zval *offset;
zval tmp;
offset = get_zval_ptr(op2, Ts, &EG(free_op2), BP_VAR_R);
switch (op2->op_type) {
case IS_CONST:
@@ -1100,7 +1155,7 @@ static void zend_fetch_property_address_read(znode *result, znode *op1, znode *o
}
/* here we are sure we are dealing with an object */
*retval = Z_OBJ_HT_P(container)->read_property(container, offset, (zend_bool) ((type==BP_VAR_IS) ? 1 : 0) TSRMLS_CC);
*retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
if (offset == &tmp) {
zval_dtor(offset);
}
@@ -1151,7 +1206,7 @@ static void zend_pre_incdec_property(znode *result, znode *op1, znode *op2, temp
}
if (!have_get_ptr) {
zval *z = Z_OBJ_HT_P(object)->read_property(object, property, 0 TSRMLS_CC);
zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_RW TSRMLS_CC);
if (z->type == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
@@ -1209,10 +1264,10 @@ static void zend_post_incdec_property(znode *result, znode *op1, znode *op2, tem
}
if (!have_get_ptr) {
zval *z = Z_OBJ_HT_P(object)->read_property(object, property, 0 TSRMLS_CC);
zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_RW TSRMLS_CC);
if (z->type == IS_OBJECT && Z_OBJ_HT_P(object)->get) {
zval *value = Z_OBJ_HT_P(object)->get(z TSRMLS_CC);
if (z->type == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (z->refcount == 0) {
zval_dtor(z);
@@ -1223,11 +1278,9 @@ static void zend_post_incdec_property(znode *result, znode *op1, znode *op2, tem
*retval = *z;
zendi_zval_copy_ctor(*retval);
incdec_op(z);
z->refcount++;
Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
if (z->refcount == 0) {
zval_dtor(z);
FREE_ZVAL(z);
}
zval_ptr_dtor(&z);
}
FREE_OP(Ts, op2, EG(free_op2));
@@ -1278,7 +1331,11 @@ static int zend_check_symbol(zval **pz TSRMLS_DC)
}
#define RETURN_FROM_EXECUTE_LOOP(execute_data) \
free_alloca(EX(Ts)); \
if (EX(op_array)->T < TEMP_VAR_STACK_LIMIT) { \
free_alloca(EX(Ts)); \
} else { \
efree(EX(Ts)); \
} \
EG(in_execution) = EX(original_in_execution); \
EG(current_execute_data) = EX(prev_execute_data); \
return 1; /* CHECK_ME */
@@ -1297,7 +1354,11 @@ ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
/* Initialize execute_data */
EX(fbc) = NULL;
EX(object) = NULL;
EX(Ts) = (temp_variable *) do_alloca(sizeof(temp_variable)*op_array->T);
if (op_array->T < TEMP_VAR_STACK_LIMIT) {
EX(Ts) = (temp_variable *) do_alloca(sizeof(temp_variable) * op_array->T);
} else {
EX(Ts) = (temp_variable *) safe_emalloc(sizeof(temp_variable), op_array->T, 0);
}
EX(op_array) = op_array;
EX(original_in_execution) = EG(in_execution);
EX(prev_execute_data) = EG(current_execute_data);
@@ -1624,10 +1685,10 @@ static inline int zend_binary_assign_op_obj_helper(int (*binary_op)(zval *result
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
z = Z_OBJ_HT_P(object)->read_property(object, property, 0 TSRMLS_CC);
z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_RW TSRMLS_CC);
break;
case ZEND_ASSIGN_DIM:
z = Z_OBJ_HT_P(object)->read_dimension(object, property, BP_VAR_W TSRMLS_CC);
z = Z_OBJ_HT_P(object)->read_dimension(object, property, BP_VAR_RW TSRMLS_CC);
break;
}
if (z->type == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
@@ -1687,12 +1748,12 @@ static inline int zend_binary_assign_op_helper(int (*binary_op)(zval *result, zv
if ((*object_ptr)->type == IS_OBJECT) {
return zend_binary_assign_op_obj_helper(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
zend_op *data_opline = opline+1;
zend_op *op_data = opline+1;
zend_fetch_dimension_address(&data_opline->op2, &opline->op1, &opline->op2, EX(Ts), BP_VAR_RW TSRMLS_CC);
zend_fetch_dimension_address(&op_data->op2, &opline->op1, &opline->op2, EX(Ts), BP_VAR_RW TSRMLS_CC);
value = get_zval_ptr(&data_opline->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
var_ptr = get_zval_ptr_ptr(&data_opline->op2, EX(Ts), BP_VAR_RW);
value = get_zval_ptr(&op_data->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
var_ptr = get_zval_ptr_ptr(&op_data->op2, EX(Ts), BP_VAR_RW);
EG(free_op2) = 0;
increment_opline = 1;
}
@@ -1719,7 +1780,18 @@ static inline int zend_binary_assign_op_helper(int (*binary_op)(zval *result, zv
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
objval->refcount++;
binary_op(objval, objval, value TSRMLS_CC);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, objval TSRMLS_CC);
zval_ptr_dtor(&objval);
} else {
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
EX_T(opline->result.u.var).var.ptr_ptr = var_ptr;
SELECTIVE_PZVAL_LOCK(*var_ptr, &opline->result);
FREE_OP(Ex(Ts), &opline->op1, EG(free_op1));
@@ -1852,7 +1924,17 @@ static inline int zend_incdec_op_helper(incdec_t incdec_op_arg, ZEND_OPCODE_HAND
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
incdec_op(*var_ptr);
if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
val->refcount++;
incdec_op(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
incdec_op(*var_ptr);
}
switch (opline->opcode) {
case ZEND_PRE_INC:
@@ -2110,36 +2192,6 @@ int zend_fetch_dim_tmp_var_handler(ZEND_OPCODE_HANDLER_ARGS)
}
int zend_make_var_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zval *value, *value2;
value = get_zval_ptr(&opline->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
switch (opline->op1.op_type) {
case IS_TMP_VAR:
value2 = value;
ALLOC_ZVAL(value);
*value = *value2;
value->is_ref = 0;
value->refcount = 0; /* lock will increase this */
break;
case IS_CONST:
value2 = value;
ALLOC_ZVAL(value);
*value = *value2;
zval_copy_ctor(value);
value->is_ref = 0;
value->refcount = 0; /* lock will increase this */
break;
}
EX_T(opline->result.u.var).var.ptr = value;
PZVAL_LOCK(EX_T(opline->result.u.var).var.ptr);
NEXT_OPCODE();
}
int zend_assign_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *op_data = opline+1;
@@ -2168,15 +2220,14 @@ int zend_assign_dim_handler(ZEND_OPCODE_HANDLER_ARGS)
zend_assign_to_object(&opline->result, object_ptr, &opline->op2, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
} else {
zval *value;
zend_op *data_opline = opline+1;
if (object_ptr) {
(*object_ptr)->refcount++; /* undo the effect of get_obj_zval_ptr_ptr() */
}
zend_fetch_dimension_address(&data_opline->op2, &opline->op1, &opline->op2, EX(Ts), BP_VAR_W TSRMLS_CC);
zend_fetch_dimension_address(&op_data->op2, &opline->op1, &opline->op2, EX(Ts), BP_VAR_W TSRMLS_CC);
value = get_zval_ptr(&data_opline->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
zend_assign_to_variable(&opline->result, &data_opline->op2, &data_opline->op1, value, (EG(free_op1)?IS_TMP_VAR:opline->op1.op_type), EX(Ts) TSRMLS_CC);
value = get_zval_ptr(&op_data->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
zend_assign_to_variable(&opline->result, &op_data->op2, &op_data->op1, value, (EG(free_op1)?IS_TMP_VAR:opline->op1.op_type), EX(Ts) TSRMLS_CC);
}
/* assign_dim has two opcodes! */
INC_OPCODE();
@@ -2207,7 +2258,7 @@ int zend_assign_ref_handler(ZEND_OPCODE_HANDLER_ARGS)
int zend_jmp_handler(ZEND_OPCODE_HANDLER_ARGS)
{
{
#if DEBUG_ZEND>=2
printf("Jumping to %d\n", opline->op1.u.opline_num);
#endif
@@ -2417,17 +2468,9 @@ int zend_init_ctor_call_handler(ZEND_OPCODE_HANDLER_ARGS)
/* We are not handling overloaded classes right now */
EX(object) = get_zval_ptr(&opline->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
if (!PZVAL_IS_REF(EX(object)) || !EG(ze1_compatibility_mode)) {
EX(object)->refcount++; /* For $this pointer */
} else {
zval *this_ptr;
ALLOC_ZVAL(this_ptr);
*this_ptr = *EX(object);
INIT_PZVAL(this_ptr);
zval_copy_ctor(this_ptr);
EX(object) = this_ptr;
}
/* New always returns the object as is_ref=0, therefore, we can just increment the reference count */
EX(object)->refcount++; /* For $this pointer */
EX(fbc) = EX(fbc_constructor);
@@ -2479,7 +2522,7 @@ int zend_init_method_call_handler(ZEND_OPCODE_HANDLER_ARGS)
if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
EX(object) = NULL;
} else {
if (!PZVAL_IS_REF(EX(object)) || !EG(ze1_compatibility_mode)) {
if (!PZVAL_IS_REF(EX(object))) {
EX(object)->refcount++; /* For $this pointer */
} else {
zval *this_ptr;
@@ -2488,7 +2531,7 @@ int zend_init_method_call_handler(ZEND_OPCODE_HANDLER_ARGS)
INIT_PZVAL(this_ptr);
zval_copy_ctor(this_ptr);
EX(object) = this_ptr;
}
}
}
if (EX(fbc)->type == ZEND_USER_FUNCTION) {
@@ -2632,12 +2675,15 @@ int zend_do_fcall_common_helper(ZEND_OPCODE_HANDLER_ARGS)
if (EX(function_state).function->common.scope) {
if (!EG(This) && !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC)) {
int severity;
char *severity_word;
if (EX(function_state).function->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
severity = E_STRICT;
severity_word = "should not";
} else {
severity = E_ERROR;
severity_word = "cannot";
}
zend_error(severity, "Non-static method %s::%s() cannot be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
zend_error(severity, "Non-static method %s::%s() %s be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name, severity_word);
}
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
@@ -2740,6 +2786,9 @@ int zend_do_fcall_common_helper(ZEND_OPCODE_HANDLER_ARGS)
if (EG(This)) {
if (EG(exception) && EX(fbc) && EX(fbc)->common.fn_flags&ZEND_ACC_CTOR) {
EG(This)->refcount--;
if (EG(This)->refcount == 1) {
zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
}
zval_ptr_dtor(&EG(This));
} else if (should_change_scope) {
zval_ptr_dtor(&EG(This));
@@ -2827,7 +2876,16 @@ int zend_return_handler(ZEND_OPCODE_HANDLER_ARGS)
return_by_value:
retval_ptr = get_zval_ptr(&opline->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
if (!EG(free_op1)) { /* Not a temp var */
if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == IS_OBJECT) {
ALLOC_ZVAL(*(EG(return_value_ptr_ptr)));
**EG(return_value_ptr_ptr) = *retval_ptr;
INIT_PZVAL(*EG(return_value_ptr_ptr));
if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
zend_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_P(retval_ptr)->name);
}
zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", Z_OBJCE_P(retval_ptr)->name);
(*EG(return_value_ptr_ptr))->value.obj = Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
} else if (!EG(free_op1)) { /* Not a temp var */
if (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 0) {
ALLOC_ZVAL(*(EG(return_value_ptr_ptr)));
**EG(return_value_ptr_ptr) = *retval_ptr;
@@ -2883,21 +2941,16 @@ int zend_catch_handler(ZEND_OPCODE_HANDLER_ARGS)
}
ce = Z_OBJCE_P(EG(exception));
if (ce != EX_T(opline->op1.u.var).class_entry) {
while (ce->parent) {
if (ce->parent == EX_T(opline->op1.u.var).class_entry) {
goto exception_should_be_taken;
if (!instanceof_function(ce, EX_T(opline->op1.u.var).class_entry TSRMLS_CC)) {
if (opline->op1.u.EA.type) {
zend_throw_exception_internal(NULL TSRMLS_CC);
NEXT_OPCODE();
}
ce = ce->parent;
SET_OPCODE(&op_array->opcodes[opline->extended_value]);
return 0; /* CHECK_ME */
}
if (opline->op1.u.EA.type) {
zend_throw_exception_internal(NULL TSRMLS_CC);
NEXT_OPCODE();
}
SET_OPCODE(&op_array->opcodes[opline->extended_value]);
return 0; /* CHECK_ME */
}
exception_should_be_taken:
zend_hash_update(EG(active_symbol_table), opline->op2.u.constant.value.str.val,
opline->op2.u.constant.value.str.len+1, &EG(exception), sizeof(zval *), (void **) NULL);
EG(exception) = NULL;
@@ -3025,9 +3078,9 @@ int zend_recv_handler(ZEND_OPCODE_HANDLER_ARGS)
} else {
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, *param TSRMLS_CC);
if (PZVAL_IS_REF(*param)) {
zend_assign_to_variable_reference(&opline->result, get_zval_ptr_ptr(&opline->result, EX(Ts), BP_VAR_W), param, NULL TSRMLS_CC);
zend_assign_to_variable_reference(NULL, get_zval_ptr_ptr(&opline->result, EX(Ts), BP_VAR_W), param, NULL TSRMLS_CC);
} else {
zend_assign_to_variable(&opline->result, &opline->result, NULL, *param, IS_VAR, EX(Ts) TSRMLS_CC);
zend_assign_to_variable(NULL, &opline->result, NULL, *param, IS_VAR, EX(Ts) TSRMLS_CC);
}
}
@@ -3060,14 +3113,14 @@ int zend_recv_init_handler(ZEND_OPCODE_HANDLER_ARGS)
assignment_value = &opline->op2.u.constant;
}
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value TSRMLS_CC);
zend_assign_to_variable(&opline->result, &opline->result, NULL, assignment_value, IS_VAR, EX(Ts) TSRMLS_CC);
zend_assign_to_variable(NULL, &opline->result, NULL, assignment_value, IS_VAR, EX(Ts) TSRMLS_CC);
} else {
assignment_value = *param;
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value TSRMLS_CC);
if (PZVAL_IS_REF(assignment_value)) {
zend_assign_to_variable_reference(&opline->result, get_zval_ptr_ptr(&opline->result, EX(Ts), BP_VAR_W), param, NULL TSRMLS_CC);
zend_assign_to_variable_reference(NULL, get_zval_ptr_ptr(&opline->result, EX(Ts), BP_VAR_W), param, NULL TSRMLS_CC);
} else {
zend_assign_to_variable(&opline->result, &opline->result, NULL, assignment_value, IS_VAR, EX(Ts) TSRMLS_CC);
zend_assign_to_variable(NULL, &opline->result, NULL, assignment_value, IS_VAR, EX(Ts) TSRMLS_CC);
}
}
@@ -3199,7 +3252,7 @@ int zend_new_handler(ZEND_OPCODE_HANDLER_ARGS)
ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
object_init_ex(EX_T(opline->result.u.var).var.ptr, EX_T(opline->op1.u.var).class_entry);
EX_T(opline->result.u.var).var.ptr->refcount=1;
EX_T(opline->result.u.var).var.ptr->is_ref=1;
EX_T(opline->result.u.var).var.ptr->is_ref=0;
NEXT_OPCODE();
}
@@ -3358,6 +3411,7 @@ static inline int zend_init_add_array_helper(ZEND_OPCODE_HANDLER_ARGS)
zend_hash_update(array_ptr->value.ht, "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
zval_ptr_dtor(&expr_ptr);
/* do nothing */
break;
@@ -3528,6 +3582,9 @@ int zend_include_or_eval_handler(ZEND_OPCODE_HANDLER_ARGS)
EG(function_state_ptr) = &EX(function_state);
destroy_op_array(new_op_array TSRMLS_CC);
efree(new_op_array);
if (EG(exception)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
}
} else {
if (return_value_used) {
ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
@@ -3612,7 +3669,7 @@ int zend_unset_dim_obj_handler(ZEND_OPCODE_HANDLER_ARGS)
case IS_BOOL:
case IS_LONG:
if (offset->type == IS_DOUBLE) {
index = (long) offset->value.lval;
index = (long) offset->value.dval;
} else {
index = offset->value.lval;
}
@@ -3747,7 +3804,7 @@ int zend_fe_fetch_handler(ZEND_OPCODE_HANDLER_ARGS)
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
zend_hash_move_forward(fe_ht);
} while (zend_check_property_access(zobj, str_key TSRMLS_CC) != SUCCESS);
} while (key_type != HASH_KEY_IS_STRING || zend_check_property_access(zobj, str_key TSRMLS_CC) != SUCCESS);
zend_unmangle_property_name(str_key, &class_name, &prop_name);
str_key_len = strlen(prop_name);
str_key = estrndup(prop_name, str_key_len);
@@ -3779,6 +3836,11 @@ int zend_fe_fetch_handler(ZEND_OPCODE_HANDLER_ARGS)
return 0; /* CHECK_ME */
}
iter->funcs->get_current_data(iter, &value TSRMLS_CC);
if (!value) {
/* failure in get_current_data */
SET_OPCODE(op_array->opcodes+opline->op2.u.opline_num);
return 0; /* CHECK_ME */
}
if (iter->funcs->get_current_key) {
key_type = iter->funcs->get_current_key(iter, &str_key, &str_key_len, &int_key TSRMLS_CC);
} else {
@@ -3921,7 +3983,7 @@ static int zend_isset_isempty_dim_prop_obj_handler(int prop_dim, ZEND_OPCODE_HAN
case IS_BOOL:
case IS_LONG:
if (offset->type == IS_DOUBLE) {
index = (long) offset->value.lval;
index = (long) offset->value.dval;
} else {
index = offset->value.lval;
}
@@ -4050,11 +4112,13 @@ int zend_end_silence_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zval restored_error_reporting;
restored_error_reporting.type = IS_LONG;
restored_error_reporting.value.lval = EX_T(opline->op1.u.var).tmp_var.value.lval;
convert_to_string(&restored_error_reporting);
zend_alter_ini_entry("error_reporting", sizeof("error_reporting"), Z_STRVAL(restored_error_reporting), Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
zendi_zval_dtor(restored_error_reporting);
if (!EG(error_reporting)) {
restored_error_reporting.type = IS_LONG;
restored_error_reporting.value.lval = EX_T(opline->op1.u.var).tmp_var.value.lval;
convert_to_string(&restored_error_reporting);
zend_alter_ini_entry("error_reporting", sizeof("error_reporting"), Z_STRVAL(restored_error_reporting), Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
zendi_zval_dtor(restored_error_reporting);
}
NEXT_OPCODE();
}
+28 -13
View File
@@ -137,7 +137,7 @@ void init_executor(TSRMLS_D)
EG(class_table) = CG(class_table);
EG(in_execution) = 0;
EG(in_autoload) = 0;
EG(in_autoload) = NULL;
zend_ptr_stack_init(&EG(argument_stack));
zend_ptr_stack_push(&EG(argument_stack), (void *) NULL);
@@ -293,6 +293,10 @@ void shutdown_executor(TSRMLS_D)
zend_ptr_stack_destroy(&EG(user_error_handlers));
zend_ptr_stack_destroy(&EG(user_exception_handlers));
zend_objects_store_destroy(&EG(objects_store));
if (EG(in_autoload)) {
zend_hash_destroy(EG(in_autoload));
FREE_HASHTABLE(EG(in_autoload));
}
} zend_end_try();
}
@@ -879,7 +883,8 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
int retval;
char *lc_name;
zval *exception;
char dummy = 1;
lc_name = do_alloca(name_length + 1);
zend_str_tolower_copy(lc_name, name, name_length);
@@ -888,13 +893,25 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
return SUCCESS;
}
if (EG(in_autoload)) {
/* The compiler is not-reentrant. Make sure we __autoload() only during run-time
* (doesn't impact fuctionality of __autoload()
*/
if (zend_is_compiling(TSRMLS_C)) {
free_alloca(lc_name);
return FAILURE;
}
EG(in_autoload) = 1;
ZVAL_STRINGL(&autoload_function, "__autoload", sizeof("__autoload")-1, 0);
if (EG(in_autoload) == NULL) {
ALLOC_HASHTABLE(EG(in_autoload));
zend_hash_init(EG(in_autoload), 0, NULL, NULL, 0);
}
if (zend_hash_add(EG(in_autoload), lc_name, name_length+1, (void**)&dummy, sizeof(char), NULL) == FAILURE) {
free_alloca(lc_name);
return FAILURE;
}
ZVAL_STRINGL(&autoload_function, ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME)-1, 0);
INIT_PZVAL(class_name_ptr);
ZVAL_STRINGL(class_name_ptr, name, name_length, 0);
@@ -905,7 +922,7 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
EG(exception) = NULL;
retval = call_user_function_ex(EG(function_table), NULL, &autoload_function, &retval_ptr, 1, args, 0, NULL TSRMLS_CC);
EG(in_autoload) = 0;
zend_hash_del(EG(in_autoload), lc_name, name_length+1);
if (retval == FAILURE) {
EG(exception) = exception;
@@ -915,7 +932,7 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
if (EG(exception)) {
free_alloca(lc_name);
zend_error(E_ERROR, "__autoload(%s) threw an exception of type '%s'", name, Z_OBJCE_P(EG(exception))->name);
zend_error(E_ERROR, "Function %s(%s) threw an exception of type '%s'", ZEND_AUTOLOAD_FUNC_NAME, name, Z_OBJCE_P(EG(exception))->name);
return FAILURE;
}
EG(exception) = exception;
@@ -1084,14 +1101,17 @@ static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wPa
if (lParam==0) {
KillTimer(timeout_window, wParam);
} else {
#ifdef ZTS
void ***tsrm_ls;
#endif
SetTimer(timeout_window, wParam, lParam*1000, NULL);
#ifdef ZTS
tsrm_ls = ts_resource_ex(0, &wParam);
if (!tsrm_ls) {
/* shouldn't normally happen */
break;
}
#endif
EG(timed_out) = 0;
}
break;
@@ -1229,7 +1249,6 @@ void zend_unset_timeout(TSRMLS_D)
zend_class_entry *zend_fetch_class(char *class_name, uint class_name_len, int fetch_type TSRMLS_DC)
{
zend_class_entry **pce;
zend_bool in_autoload;
check_fetch_type:
switch (fetch_type) {
@@ -1255,13 +1274,9 @@ check_fetch_type:
break;
}
in_autoload = EG(in_autoload);
EG(in_autoload) = 0;
if (zend_lookup_class(class_name, class_name_len, &pce TSRMLS_CC)==FAILURE) {
EG(in_autoload) = in_autoload;
zend_error(E_ERROR, "Class '%s' not found", class_name);
}
EG(in_autoload) = in_autoload;
return *pce;
}
+4 -1
View File
@@ -24,7 +24,10 @@
#include "zend_compile.h"
#define ZEND_EXTENSION_API_NO 90021012
/* The first number is the engine version and the rest is the date.
* This way engine 2 API no. is always greater than engine 1 API no..
*/
#define ZEND_EXTENSION_API_NO 220040412
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
+3 -1
View File
@@ -34,6 +34,7 @@
#include "zend_fast_cache.h"
#include "zend_objects.h"
#include "zend_objects_API.h"
#include "zend_modules.h"
#ifdef ZEND_MULTIBYTE
#include "zend_multibyte.h"
@@ -190,7 +191,7 @@ struct _zend_executor_globals {
int ticks_count;
zend_bool in_execution;
zend_bool in_autoload;
HashTable *in_autoload;
zend_bool bailout_set;
zend_bool full_tables_cleanup;
zend_bool ze1_compatibility_mode;
@@ -232,6 +233,7 @@ struct _zend_executor_globals {
struct _zend_execute_data *current_execute_data;
struct _zend_module_entry *current_module;
zend_property_info std_property_info;
+17 -11
View File
@@ -137,6 +137,7 @@ ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength)
ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
{
uint i = 3;
Bucket **tmp;
SET_INCONSISTENT(HT_OK);
@@ -146,18 +147,8 @@ ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunctio
ht->nTableSize = 1 << i;
ht->nTableMask = ht->nTableSize - 1;
/* Uses ecalloc() so that Bucket* == NULL */
if (persistent) {
ht->arBuckets = (Bucket **) calloc(ht->nTableSize, sizeof(Bucket *));
if (!ht->arBuckets) {
return FAILURE;
}
} else {
ht->arBuckets = (Bucket **) ecalloc_rel(ht->nTableSize, sizeof(Bucket *));
}
ht->pDestructor = pDestructor;
ht->arBuckets = NULL;
ht->pListHead = NULL;
ht->pListTail = NULL;
ht->nNumOfElements = 0;
@@ -166,6 +157,21 @@ ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunctio
ht->persistent = persistent;
ht->nApplyCount = 0;
ht->bApplyProtection = 1;
/* Uses ecalloc() so that Bucket* == NULL */
if (persistent) {
tmp = (Bucket **) calloc(ht->nTableSize, sizeof(Bucket *));
if (!tmp) {
return FAILURE;
}
ht->arBuckets = tmp;
} else {
tmp = (Bucket **) ecalloc_rel(ht->nTableSize, sizeof(Bucket *));
if (tmp) {
ht->arBuckets = tmp;
}
}
return SUCCESS;
}
+17 -2
View File
@@ -147,10 +147,25 @@ ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_num
zend_ini_entry *p = ini_entry;
zend_ini_entry *hashed_ini_entry;
zval default_value;
HashTable *directives = registered_zend_ini_directives;
#ifdef ZTS
/* if we are called during the request, eg: from dl(),
* then we should not touch the global directives table,
* and should update the per-(request|thread) version instead.
* This solves two problems: one is that ini entries for dl()'d
* extensions will now work, and the second is that updating the
* global hash here from dl() is not mutex protected and can
* lead to death.
*/
if (directives != EG(ini_directives)) {
directives = EG(ini_directives);
}
#endif
while (p->name) {
p->module_number = module_number;
if (zend_hash_add(registered_zend_ini_directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry)==FAILURE) {
if (zend_hash_add(directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry)==FAILURE) {
zend_unregister_ini_entries(module_number TSRMLS_CC);
return FAILURE;
}
@@ -202,7 +217,7 @@ ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value,
return FAILURE;
}
if (!(ini_entry->modifyable & modify_type)) {
if (!(ini_entry->modifiable & modify_type)) {
return FAILURE;
}
+30 -30
View File
@@ -64,7 +64,7 @@ typedef struct _zend_ini_entry zend_ini_entry;
struct _zend_ini_entry {
int module_number;
int modifyable;
int modifiable;
char *name;
uint name_length;
ZEND_INI_MH((*on_modify));
@@ -113,44 +113,44 @@ END_EXTERN_C()
#define ZEND_INI_BEGIN() static zend_ini_entry ini_entries[] = {
#define ZEND_INI_END() { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, NULL } };
#define ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, arg3, displayer) \
{ 0, modifyable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, displayer },
#define ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, displayer) \
{ 0, modifiable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, displayer },
#define ZEND_INI_ENTRY3(name, default_value, modifyable, on_modify, arg1, arg2, arg3) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, arg3, NULL)
#define ZEND_INI_ENTRY3(name, default_value, modifiable, on_modify, arg1, arg2, arg3) \
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, NULL)
#define ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, arg1, arg2, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, arg2, NULL, displayer)
#define ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, arg1, arg2, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL, displayer)
#define ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, arg1, arg2) \
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, arg1, arg2, NULL)
#define ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, arg1, arg2) \
ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL)
#define ZEND_INI_ENTRY1_EX(name, default_value, modifyable, on_modify, arg1, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, arg1, NULL, NULL, displayer)
#define ZEND_INI_ENTRY1_EX(name, default_value, modifiable, on_modify, arg1, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, NULL, NULL, displayer)
#define ZEND_INI_ENTRY1(name, default_value, modifyable, on_modify, arg1) \
ZEND_INI_ENTRY1_EX(name, default_value, modifyable, on_modify, arg1, NULL)
#define ZEND_INI_ENTRY1(name, default_value, modifiable, on_modify, arg1) \
ZEND_INI_ENTRY1_EX(name, default_value, modifiable, on_modify, arg1, NULL)
#define ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, NULL, NULL, NULL, displayer)
#define ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, displayer) \
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, NULL, NULL, NULL, displayer)
#define ZEND_INI_ENTRY(name, default_value, modifyable, on_modify) \
ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, NULL)
#define ZEND_INI_ENTRY(name, default_value, modifiable, on_modify) \
ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, NULL)
#ifdef ZTS
#define STD_ZEND_INI_ENTRY(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id)
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr, displayer) \
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, displayer)
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, NULL, zend_ini_boolean_displayer_cb)
#define STD_ZEND_INI_ENTRY(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id)
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr, displayer) \
ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, displayer)
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, NULL, zend_ini_boolean_displayer_cb)
#else
#define STD_ZEND_INI_ENTRY(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY2(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr)
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr, displayer) \
ZEND_INI_ENTRY2_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, displayer)
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifyable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY3_EX(name, default_value, modifyable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, NULL, zend_ini_boolean_displayer_cb)
#define STD_ZEND_INI_ENTRY(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr)
#define STD_ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr, displayer) \
ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, displayer)
#define STD_ZEND_INI_BOOLEAN(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr) \
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, NULL, zend_ini_boolean_displayer_cb)
#endif
#define INI_INT(name) zend_ini_long((name), sizeof(name), 0)
@@ -192,7 +192,7 @@ END_EXTERN_C()
/* INI parsing engine */
typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, int callback_type, void *arg);
BEGIN_EXTERN_C()
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg);
ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg);
END_EXTERN_C()
#define ZEND_INI_PARSER_ENTRY 1
+1 -1
View File
@@ -139,7 +139,7 @@ static void ini_error(char *str)
}
int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg)
ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg)
{
int retval;
zend_ini_parser_param ini_parser_param;
+15 -17
View File
@@ -22,10 +22,10 @@
#include "zend_API.h"
#include "zend_interfaces.h"
zend_class_entry *zend_ce_traversable;
zend_class_entry *zend_ce_aggregate;
zend_class_entry *zend_ce_iterator;
zend_class_entry *zend_ce_arrayaccess;
ZEND_API zend_class_entry *zend_ce_traversable;
ZEND_API zend_class_entry *zend_ce_aggregate;
ZEND_API zend_class_entry *zend_ce_iterator;
ZEND_API zend_class_entry *zend_ce_arrayaccess;
/* {{{ zend_call_method
Only returns the returned zval if retval_ptr != NULL */
@@ -108,7 +108,7 @@ static zval *zend_user_it_new_iterator(zend_class_entry *ce, zval *object TSRMLS
/* }}} */
/* {{{ zend_user_it_dtor */
ZEND_API void zend_user_it_free_current(zend_object_iterator *_iter TSRMLS_DC)
static void zend_user_it_invalidate_current(zend_object_iterator *_iter TSRMLS_DC)
{
zend_user_iterator *iter = (zend_user_iterator*)_iter;
@@ -125,10 +125,7 @@ static void zend_user_it_dtor(zend_object_iterator *_iter TSRMLS_DC)
zend_user_iterator *iter = (zend_user_iterator*)_iter;
zval *object = (zval*)iter->it.data;
if (iter->value) {
zval_ptr_dtor(&iter->value);
iter->value = NULL;
}
zend_user_it_invalidate_current(_iter TSRMLS_CC);
zval_ptr_dtor(&object);
efree(iter);
}
@@ -186,12 +183,15 @@ static int zend_user_it_get_current_key(zend_object_iterator *_iter, char **str_
zend_call_method_with_0_params(&object, iter->ce, &iter->ce->iterator_funcs.zf_key, "key", &retval);
if (!retval) {
*int_key = 0;
zend_error(E_WARNING, "Nothing returned from %s::key()", iter->ce->name);
return HASH_KEY_IS_LONG;
}
switch (retval->type) {
default:
zend_error(E_WARNING, "Illegal type returned from %s::key()", iter->ce->name);
case IS_NULL:
*str_key = "";
*str_key_len = 0;
*int_key = 0;
zval_ptr_dtor(&retval);
return HASH_KEY_IS_LONG;
@@ -199,7 +199,6 @@ static int zend_user_it_get_current_key(zend_object_iterator *_iter, char **str_
case IS_STRING:
*str_key = estrndup(retval->value.str.val, retval->value.str.len);
*str_key_len = retval->value.str.len+1;
*int_key = 0;
zval_ptr_dtor(&retval);
return HASH_KEY_IS_STRING;
@@ -225,10 +224,7 @@ static void zend_user_it_move_forward(zend_object_iterator *_iter TSRMLS_DC)
zend_user_iterator *iter = (zend_user_iterator*)_iter;
zval *object = (zval*)iter->it.data;
if (iter->value) {
zval_ptr_dtor(&iter->value);
iter->value = NULL;
}
zend_user_it_invalidate_current(_iter TSRMLS_CC);
zend_call_method_with_0_params(&object, iter->ce, &iter->ce->iterator_funcs.zf_next, "next", NULL);
}
/* }}} */
@@ -239,6 +235,7 @@ static void zend_user_it_rewind(zend_object_iterator *_iter TSRMLS_DC)
zend_user_iterator *iter = (zend_user_iterator*)_iter;
zval *object = (zval*)iter->it.data;
zend_user_it_invalidate_current(_iter TSRMLS_CC);
zend_call_method_with_0_params(&object, iter->ce, &iter->ce->iterator_funcs.zf_rewind, "rewind", NULL);
}
/* }}} */
@@ -249,7 +246,8 @@ zend_object_iterator_funcs zend_interface_iterator_funcs_iterator = {
zend_user_it_get_current_data,
zend_user_it_get_current_key,
zend_user_it_move_forward,
zend_user_it_rewind
zend_user_it_rewind,
zend_user_it_invalidate_current
};
/* {{{ zend_user_it_get_iterator */
+4 -6
View File
@@ -26,10 +26,10 @@
BEGIN_EXTERN_C()
ZEND_API zend_class_entry *zend_ce_traversable;
ZEND_API zend_class_entry *zend_ce_aggregate;
ZEND_API zend_class_entry *zend_ce_iterator;
ZEND_API zend_class_entry *zend_ce_arrayaccess;
extern ZEND_API zend_class_entry *zend_ce_traversable;
extern ZEND_API zend_class_entry *zend_ce_aggregate;
extern ZEND_API zend_class_entry *zend_ce_iterator;
extern ZEND_API zend_class_entry *zend_ce_arrayaccess;
typedef struct _zend_user_iterator {
zend_object_iterator it;
@@ -37,8 +37,6 @@ typedef struct _zend_user_iterator {
zval *value;
} zend_user_iterator;
ZEND_API void zend_user_it_free_current(zend_object_iterator *_iter TSRMLS_DC);
ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int function_name_len, zval **retval_ptr_ptr, int param_count, zval* arg1, zval* arg2 TSRMLS_DC);
#define zend_call_method_with_0_params(obj, obj_ce, fn_proxy, function_name, retval) \
+2 -1
View File
@@ -44,7 +44,8 @@ static zend_object_handlers iterator_object_handlers = {
NULL, /* get_ce */
NULL, /* get class name */
NULL, /* compare */
NULL /* cast */
NULL, /* cast */
NULL /* count */
};
ZEND_API void zend_register_iterator_wrapper(TSRMLS_D)
+3
View File
@@ -46,6 +46,9 @@ typedef struct _zend_object_iterator_funcs {
/* rewind to start of data (optional, may be NULL) */
void (*rewind)(zend_object_iterator *iter TSRMLS_DC);
/* invalidate current value/key (optional, may be NULL) */
void (*invalidate_current)(zend_object_iterator *iter TSRMLS_DC);
} zend_object_iterator_funcs;
struct _zend_object_iterator {
+8 -3
View File
@@ -229,8 +229,13 @@ additional_catches:
;
non_empty_additional_catches:
non_empty_additional_catches T_CATCH '(' fully_qualified_class_name { $$.u.opline_num = get_next_op_number(CG(active_op_array)); } T_VARIABLE ')' { zend_do_begin_catch(&$2, &$4, &$6, 0 TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$2 TSRMLS_CC); }
| T_CATCH '(' fully_qualified_class_name { $$.u.opline_num = get_next_op_number(CG(active_op_array)); } T_VARIABLE ')' { zend_do_begin_catch(&$1, &$3, &$5, 0 TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
additional_catch { $$ = $1; }
| non_empty_additional_catches additional_catch { $$ = $2; }
;
additional_catch:
T_CATCH '(' fully_qualified_class_name { $$.u.opline_num = get_next_op_number(CG(active_op_array)); } T_VARIABLE ')' { zend_do_begin_catch(&$1, &$3, &$5, 0 TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
;
@@ -537,7 +542,7 @@ non_empty_for_expr:
expr_without_variable:
T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 TSRMLS_CC); }
| variable '=' expr { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
| variable '=' '&' variable { zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
| variable '=' '&' variable { zend_check_writable_variable(&$1); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
| variable '=' '&' T_NEW class_name_reference { zend_error(E_STRICT, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
| T_NEW class_name_reference { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
| T_CLONE expr { zend_do_clone(&$$, &$2 TSRMLS_CC); }
+1 -11
View File
@@ -1382,16 +1382,6 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_OPEN_TAG;
}
<INITIAL>"<?php_track_vars?>"{NEWLINE}? {
zend_error(E_WARNING, "&lt;?php_track_vars?&gt; is no longer supported - please use the track_vars INI directive instead");
HANDLE_NEWLINE(yytext[yyleng-1]);
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
return T_INLINE_HTML;
}
<ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE>"$"{LABEL} {
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
@@ -1455,7 +1445,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
}
<ST_IN_SCRIPTING>"/**"{NEWLINE} {
<ST_IN_SCRIPTING>"/**"{WHITESPACE} {
CG(comment_start_line) = CG(zend_lineno);
BEGIN(ST_DOC_COMMENT);
yymore();
+8 -2
View File
@@ -24,10 +24,16 @@
#include <sys/types.h>
#include "zend.h"
#include "zend_types.h"
/* Define this to enable Zend MM */
#define ZEND_MM
#ifdef ZEND_WIN32
#undef ZEND_MM
#else
/* #define ZEND_MM */
#undef ZEND_MM
#endif
/* mm block type */
typedef struct _zend_mm_block {
+1 -1
View File
@@ -37,7 +37,7 @@ extern struct _zend_arg_info third_arg_force_ref[4];
extern struct _zend_arg_info fourth_arg_force_ref[5];
extern struct _zend_arg_info all_args_by_ref[1];
#define ZEND_MODULE_API_NO 20040316
#define ZEND_MODULE_API_NO 20040412
#ifdef ZTS
#define USING_ZTS 1
#else
+18 -1
View File
@@ -12,12 +12,27 @@
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Ard Biesheuvel <ard@ard.nu> |
| Authors: Sascha Schumann <sascha@schumann.cx> |
| Ard Biesheuvel <ard@ard.nu> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#if defined(__i386__) && defined(__GNUC__)
#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \
long __tmpvar; \
__asm__ ("imul %3,%0\n" \
"adc $0,%1" \
: "=r"(__tmpvar),"=r"(usedval) \
: "0"(a), "r"(b), "1"(0)); \
if (usedval) (dval) = (double) (a) * (double) (b); \
else (lval) = __tmpvar; \
} while (0)
#else
#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \
long __lres = (a) * (b); \
double __dres = (double)(a) * (double)(b); \
@@ -28,3 +43,5 @@
(lval) = __lres; \
} \
} while (0)
#endif
+14 -4
View File
@@ -141,7 +141,7 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D
zval_ptr_dtor(&value);
if (retval && zval_is_true(retval)) {
if (retval && zend_is_true(retval)) {
ret = SUCCESS;
} else {
ret = FAILURE;
@@ -261,14 +261,16 @@ ZEND_API int zend_check_property_access(zend_object *zobj, char *prop_info_name
return zend_verify_property_access(property_info, zobj->ce TSRMLS_CC) ? SUCCESS : FAILURE;
}
zval *zend_std_read_property(zval *object, zval *member, zend_bool silent TSRMLS_DC)
zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC)
{
zend_object *zobj;
zval tmp_member;
zval **retval;
zval *rv = NULL;
zend_property_info *property_info;
int silent;
silent = (type == BP_VAR_IS);
zobj = Z_OBJ_P(object);
if (member->type != IS_STRING) {
@@ -379,7 +381,14 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
zval *retval;
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
if(offset == NULL) {
/* [] construct */
zval offset_null;
INIT_ZVAL(offset_null);
offset = &offset_null;
}
zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset);
if (!retval) {
if (!EG(exception)) {
zend_error(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
@@ -669,6 +678,7 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name
zobj = Z_OBJ_P(object);
if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&fbc) == FAILURE) {
free_alloca(lc_method_name);
if (zobj->ce->__call) {
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
call_user_call->type = ZEND_INTERNAL_FUNCTION;
@@ -679,7 +689,6 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name
call_user_call->fn_flags = 0;
call_user_call->function_name = estrndup(method_name, method_len);
free_alloca(lc_method_name);
return (union _zend_function *)call_user_call;
} else {
return NULL;
@@ -970,6 +979,7 @@ ZEND_API zend_object_handlers std_object_handlers = {
zend_std_object_get_class_name, /* get_class_name */
zend_std_compare_objects, /* compare_objects */
NULL, /* cast_object */
NULL, /* count_elements */
};
/*
+9 -7
View File
@@ -29,7 +29,7 @@ union _zend_function;
symbol table, its reference count should be 0.
*/
/* Used to fetch property from the object, read-only */
typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, zend_bool silent TSRMLS_DC);
typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, int type TSRMLS_DC);
/* Used to fetch dimension from the object, read-only */
typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int type TSRMLS_DC);
@@ -50,14 +50,12 @@ typedef void (*zend_object_write_dimension_t)(zval *object, zval *offset, zval *
/* Used to create pointer to the property of the object, for future direct r/w access */
typedef zval **(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member TSRMLS_DC);
/* Used to set object value (most probably used in combination with
* typedef the result of the get_property_ptr)
*/
/* Used to set object value. Can be used to override assignments and scalar
write ops (like ++, +=) on the object */
typedef void (*zend_object_set_t)(zval **property, zval *value TSRMLS_DC);
/* Used to get object value (most probably used in combination with
* the result of the get_property_ptr or when converting object value to
* one of the basic types)
/* Used to get object value. Can be used when converting object value to
* one of the basic types and when using scalar ops (like ++, +=) on the object
*/
typedef zval* (*zend_object_get_t)(zval *property TSRMLS_DC);
@@ -95,6 +93,9 @@ typedef int (*zend_object_get_class_name_t)(zval *object, char **class_name, zen
typedef int (*zend_object_compare_t)(zval *object1, zval *object2 TSRMLS_DC);
typedef int (*zend_object_cast_t)(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC);
/* updates *count to hold the number of elements present and returns SUCCESS.
* Returns FAILURE if the object does not have any sense of overloaded dimensions */
typedef int (*zend_object_count_elements_t)(zval *object, long *count TSRMLS_DC);
typedef struct _zend_object_handlers {
/* general object functions */
@@ -121,6 +122,7 @@ typedef struct _zend_object_handlers {
zend_object_get_class_name_t get_class_name;
zend_object_compare_t compare_objects;
zend_object_cast_t cast_object;
zend_object_count_elements_t count_elements;
} zend_object_handlers;
extern ZEND_API zend_object_handlers std_object_handlers;
+33 -9
View File
@@ -48,10 +48,12 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS
if (objects->object_buckets[i].valid) {
struct _store_object *obj = &objects->object_buckets[i].bucket.obj;
if (obj->dtor && !objects->object_buckets[i].destructor_called) {
obj->dtor(obj->object, i TSRMLS_CC);
if (!objects->object_buckets[i].destructor_called) {
objects->object_buckets[i].destructor_called = 1;
if (obj->dtor) {
obj->dtor(obj->object, i TSRMLS_CC);
}
}
objects->object_buckets[i].destructor_called = 1;
}
}
}
@@ -190,6 +192,29 @@ ZEND_API void *zend_object_store_get_object(zval *zobject TSRMLS_DC)
return EG(objects_store).object_buckets[handle].bucket.obj.object;
}
/* zend_object_store_set_object:
* It is ONLY valid to call this function from within the constructor of an
* overloaded object. Its purpose is to set the object pointer for the object
* when you can't possibly know its value until you have parsed the arguments
* from the constructor function. You MUST NOT use this function for any other
* weird games, or call it at any other time after the object is constructed.
* */
ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC)
{
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
EG(objects_store).object_buckets[handle].bucket.obj.object = object;
}
/* Called when the ctor was terminated by an exception */
ZEND_API void zend_object_store_ctor_failed(zval *zobject TSRMLS_DC)
{
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
EG(objects_store).object_buckets[handle].destructor_called = 1;
}
/* Proxy objects workings */
typedef struct _zend_proxy_object {
@@ -215,10 +240,10 @@ ZEND_API void zend_objects_proxy_clone(zend_proxy_object *object, zend_proxy_obj
zval_add_ref(&(*object_clone)->object);
}
ZEND_API zval **zend_object_create_proxy(zval *object, zval *member TSRMLS_DC)
ZEND_API zval *zend_object_create_proxy(zval *object, zval *member TSRMLS_DC)
{
zend_proxy_object *pobj = emalloc(sizeof(zend_proxy_object));
zval *retval, **pretval;
zval *retval;
pobj->object = object;
pobj->property = member;
@@ -229,10 +254,8 @@ ZEND_API zval **zend_object_create_proxy(zval *object, zval *member TSRMLS_DC)
retval->type = IS_OBJECT;
Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(pobj, NULL, (zend_objects_free_object_storage_t) zend_objects_proxy_free_storage, (zend_objects_store_clone_t) zend_objects_proxy_clone TSRMLS_CC);
Z_OBJ_HT_P(retval) = &zend_object_proxy_handlers;
pretval = emalloc(sizeof(zval *));
*pretval = retval;
return pretval;
return retval;
}
ZEND_API void zend_object_proxy_set(zval **property, zval *value TSRMLS_DC)
@@ -251,7 +274,7 @@ ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC)
zend_proxy_object *probj = zend_object_store_get_object(property TSRMLS_CC);
if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->read_property) {
return Z_OBJ_HT_P(probj->object)->read_property(probj->object, probj->property, 0 TSRMLS_CC);
return Z_OBJ_HT_P(probj->object)->read_property(probj->object, probj->property, BP_VAR_R TSRMLS_CC);
} else {
zend_error(E_WARNING, "Cannot read property of object - no read handler defined");
}
@@ -286,6 +309,7 @@ static zend_object_handlers zend_object_proxy_handlers = {
NULL, /* get_class_name */
NULL, /* compare_objects */
NULL, /* cast_object */
NULL, /* count_elements */
};
+5 -2
View File
@@ -64,14 +64,17 @@ ZEND_API zend_object_handle zend_objects_store_put(void *object, zend_objects_st
ZEND_API void zend_objects_store_add_ref(zval *object TSRMLS_DC);
ZEND_API void zend_objects_store_del_ref(zval *object TSRMLS_DC);
ZEND_API void zend_objects_store_delete_obj(zval *object TSRMLS_DC);
ZEND_API zend_object_value zend_objects_store_clone_obj(zval *object TSRMLS_DC);
ZEND_API void *zend_object_store_get_object(zval *object TSRMLS_DC);
/* See comment in zend_objects_API.c before you use this */
ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC);
ZEND_API void zend_object_store_ctor_failed(zval *zobject TSRMLS_DC);
ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects TSRMLS_DC);
#define ZEND_OBJECTS_STORE_HANDLERS zend_objects_store_add_ref, zend_objects_store_del_ref, zend_objects_store_clone_obj
ZEND_API zval **zend_object_create_proxy(zval *object, zval *member TSRMLS_DC);
ZEND_API zval *zend_object_create_proxy(zval *object, zval *member TSRMLS_DC);
ZEND_API zend_object_handlers *zend_get_std_object_handlers();
END_EXTERN_C()
+7
View File
@@ -108,6 +108,13 @@ ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC)
}
}
ZEND_API void zend_function_dtor(zend_function *function)
{
TSRMLS_FETCH();
destroy_zend_function(function TSRMLS_CC);
}
static void zend_cleanup_op_array_data(zend_op_array *op_array)
{
if (op_array->static_variables) {
+114 -108
View File
@@ -30,10 +30,6 @@
#include "zend_API.h"
#include "zend_multiply.h"
#if 0&&HAVE_BCMATH
#include "ext/bcmath/number.h"
#endif
#define LONG_SIGN_MASK (1L << (8*sizeof(long)-1))
ZEND_API int zend_atoi(const char *str, int str_len)
@@ -118,11 +114,6 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
case IS_DOUBLE:
case IS_LONG:
break;
#if 0 && HAVE_BCMATH
case FLAG_IS_BC:
op->type = IS_DOUBLE; /* may have lost significant digits */
break;
#endif
default:
op->value.lval = strtol(op->value.str.val, NULL, 10);
op->type = IS_LONG;
@@ -138,6 +129,9 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
zend_list_delete(op->value.lval);
op->type = IS_LONG;
break;
case IS_OBJECT:
convert_to_long_base(op, 10);
break;
case IS_NULL:
op->type = IS_LONG;
op->value.lval = 0;
@@ -158,9 +152,6 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
case IS_DOUBLE: \
case IS_LONG: \
break; \
case FLAG_IS_BC: \
(holder).type = IS_DOUBLE; /* may have lost significant digits */ \
break; \
default: \
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
(holder).type = IS_LONG; \
@@ -180,6 +171,14 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
(holder).type = IS_LONG; \
(op) = &(holder); \
break; \
case IS_OBJECT: \
(holder) = (*(op)); \
zval_copy_ctor(&(holder)); \
convert_to_long_base(&(holder), 10); \
if ((holder).type == IS_LONG) { \
(op) = &(holder); \
} \
break; \
} \
}
@@ -206,7 +205,7 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
case IS_OBJECT: \
(holder) = (*(op)); \
zval_copy_ctor(&(holder)); \
convert_to_long(&(holder)); \
convert_to_long_base(&(holder), 10); \
break; \
case IS_BOOL: \
case IS_RESOURCE: \
@@ -262,6 +261,25 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
}
#define convert_object_to_type(op, ctype, conv_func) \
if (Z_OBJ_HT_P(op)->cast_object) { \
if (Z_OBJ_HT_P(op)->cast_object(op, op, ctype, 1 TSRMLS_CC) == SUCCESS) { \
op->type = ctype; \
} \
} else { \
if(Z_OBJ_HT_P(op)->get) { \
zval *newop = Z_OBJ_HT_P(op)->get(op TSRMLS_CC); \
if(Z_TYPE_P(newop) != IS_OBJECT) { \
/* for safety - avoid loop */ \
zval_dtor(op); \
*op = *newop; \
FREE_ZVAL(newop); \
conv_func(op); \
} \
} \
}
ZEND_API void convert_to_long(zval *op)
{
convert_to_long_base(op, 10);
@@ -301,28 +319,27 @@ ZEND_API void convert_to_long_base(zval *op, int base)
break;
case IS_OBJECT:
{
int retval = 1;
TSRMLS_FETCH();
if (op->value.obj.handlers->cast_object) {
if (op->value.obj.handlers->cast_object(op, op, IS_LONG, 1 TSRMLS_CC) == SUCCESS) {
break;
}
} else {
int retval = 1;
if (EG(ze1_compatibility_mode)) {
HashTable *ht = Z_OBJPROP_P(op);
if (ht) {
retval = (zend_hash_num_elements(ht)?1:0);
}
} else {
zend_error(E_NOTICE, "Object of class %s could not be converted to integer", Z_OBJCE_P(op)->name);
}
convert_object_to_type(op, IS_LONG, convert_to_long);
if (op->type == IS_LONG) {
return;
}
if (EG(ze1_compatibility_mode)) {
HashTable *ht = Z_OBJPROP_P(op);
if (ht) {
retval = (zend_hash_num_elements(ht)?1:0);
}
zval_dtor(op);
ZVAL_LONG(op, retval);
return;
} else {
/* we cannot convert it to long */
return;
}
break;
}
default:
zend_error(E_WARNING, "Cannot convert to ordinal value");
@@ -369,28 +386,26 @@ ZEND_API void convert_to_double(zval *op)
break;
case IS_OBJECT:
{
double retval = 1.0;
TSRMLS_FETCH();
convert_object_to_type(op, IS_DOUBLE, convert_to_double);
if (op->value.obj.handlers->cast_object) {
TSRMLS_FETCH();
if (op->value.obj.handlers->cast_object(op, op, IS_DOUBLE, 1 TSRMLS_CC) == SUCCESS) {
break;
if (op->type == IS_DOUBLE) {
return;
}
if (EG(ze1_compatibility_mode)) {
HashTable *ht = Z_OBJPROP_P(op);
if (ht) {
retval = (zend_hash_num_elements(ht)?1.0:0.0);
}
} else {
double retval = 1.0;
if (EG(ze1_compatibility_mode)) {
HashTable *ht = Z_OBJPROP_P(op);
if (ht) {
retval = (zend_hash_num_elements(ht)?1.0:0.0);
}
} else {
zend_error(E_NOTICE, "Object of class %s could not be converted to double", Z_OBJCE_P(op)->name);
}
zval_dtor(op);
ZVAL_DOUBLE(op, retval);
zend_error(E_NOTICE, "Object of class %s could not be converted to double", Z_OBJCE_P(op)->name);
}
zval_dtor(op);
ZVAL_DOUBLE(op, retval);
break;
}
default:
@@ -406,9 +421,9 @@ ZEND_API void convert_to_double(zval *op)
ZEND_API void convert_to_null(zval *op)
{
if (op->type == IS_OBJECT) {
if (op->value.obj.handlers->cast_object) {
if (Z_OBJ_HT_P(op)->cast_object) {
TSRMLS_FETCH();
if (op->value.obj.handlers->cast_object(op, op, IS_NULL, 1 TSRMLS_CC) == SUCCESS) {
if (Z_OBJ_HT_P(op)->cast_object(op, op, IS_NULL, 1 TSRMLS_CC) == SUCCESS) {
return;
}
}
@@ -460,25 +475,24 @@ ZEND_API void convert_to_boolean(zval *op)
break;
case IS_OBJECT:
{
zend_bool retval = 1;
TSRMLS_FETCH();
if (op->value.obj.handlers->cast_object) {
if (op->value.obj.handlers->cast_object(op, op, IS_BOOL, 1 TSRMLS_CC) == SUCCESS) {
break;
}
} else {
zend_bool retval = 1;
if (EG(ze1_compatibility_mode)) {
HashTable *ht = Z_OBJPROP_P(op);
if (ht) {
retval = (zend_hash_num_elements(ht)?1:0);
}
}
convert_object_to_type(op, IS_BOOL, convert_to_double);
zval_dtor(op);
ZVAL_BOOL(op, retval);
if (op->type == IS_BOOL) {
return;
}
if (EG(ze1_compatibility_mode)) {
HashTable *ht = Z_OBJPROP_P(op);
if (ht) {
retval = (zend_hash_num_elements(ht)?1:0);
}
}
zval_dtor(op);
ZVAL_BOOL(op, retval);
break;
}
default:
@@ -489,7 +503,6 @@ ZEND_API void convert_to_boolean(zval *op)
op->type = IS_BOOL;
}
ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
{
long lval;
@@ -542,14 +555,14 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
break;
case IS_OBJECT: {
TSRMLS_FETCH();
if (op->value.obj.handlers->cast_object) {
if (op->value.obj.handlers->cast_object(op, op, IS_STRING, 1 TSRMLS_CC) == SUCCESS) {
break;
}
zend_error(E_NOTICE, "Object of class %s could not be converted to string", Z_OBJCE_P(op)->name);
} else {
zend_error(E_NOTICE, "Object of class %s to string conversion", Z_OBJCE_P(op)->name);
convert_object_to_type(op, IS_STRING, convert_to_string);
if (op->type == IS_STRING) {
return;
}
zend_error(E_NOTICE, "Object of class %s to string conversion", Z_OBJCE_P(op)->name);
zval_dtor(op);
op->value.str.val = estrndup_rel("Object", sizeof("Object")-1);
op->value.str.len = sizeof("Object")-1;
@@ -609,7 +622,16 @@ ZEND_API void convert_to_array(zval *op)
ALLOC_HASHTABLE(ht);
zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0);
if (Z_OBJ_HT_P(op)->get_properties) {
zend_hash_copy(ht, Z_OBJ_HT_P(op)->get_properties(op TSRMLS_CC), (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
HashTable *obj_ht = Z_OBJ_HT_P(op)->get_properties(op TSRMLS_CC);
if(obj_ht) {
zend_hash_copy(ht, obj_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
} else {
convert_object_to_type(op, IS_ARRAY, convert_to_array);
if (op->type == IS_ARRAY) {
return;
}
}
zval_dtor(op);
op->type = IS_ARRAY;
@@ -1278,6 +1300,16 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
COMPARE_RETURN_AND_FREE(SUCCESS);
}
if (op1->type==IS_OBJECT && op2->type==IS_OBJECT) {
/* If the handlers array is not identical, fall through
* and perform get() or cast() if implemented
*/
if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2)) {
zend_compare_objects(result, op1, op2 TSRMLS_CC);
COMPARE_RETURN_AND_FREE(SUCCESS);
}
}
zendi_convert_scalar_to_number(op1, op1_copy, result);
zendi_convert_scalar_to_number(op2, op2_copy, result);
@@ -1298,11 +1330,6 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
COMPARE_RETURN_AND_FREE(SUCCESS);
}
if (op1->type==IS_OBJECT && op2->type==IS_OBJECT) {
zend_compare_objects(result, op1, op2 TSRMLS_CC);
COMPARE_RETURN_AND_FREE(SUCCESS);
}
if (op1->type==IS_ARRAY) {
result->value.lval = 1;
result->type = IS_LONG;
@@ -1381,8 +1408,16 @@ ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
}
break;
case IS_OBJECT:
if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2) && Z_OBJ_HANDLE_P(op1) == Z_OBJ_HANDLE_P(op2)) {
result->value.lval = 1;
if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2)) {
if (EG(ze1_compatibility_mode)) {
zend_compare_objects(result, op1, op2 TSRMLS_CC);
/* comparison returns 0 in case of equality and
* 1 in case of ineqaulity, we need to reverse it
*/
result->value.lval = !result->value.lval;
} else {
result->value.lval = (Z_OBJ_HANDLE_P(op1) == Z_OBJ_HANDLE_P(op2));
}
} else {
result->value.lval = 0;
}
@@ -1641,10 +1676,6 @@ ZEND_API int increment_function(zval *op1)
op1->type = IS_DOUBLE;
efree(strval); /* should never be empty_string */
break;
#if 0
case FLAG_IS_BC:
/* Not implemented */
#endif
default:
/* Perl style string increment */
increment_string(op1);
@@ -1834,22 +1865,6 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
if ((ret1=is_numeric_string(s1->value.str.val, s1->value.str.len, &lval1, &dval1, 0)) &&
(ret2=is_numeric_string(s2->value.str.val, s2->value.str.len, &lval2, &dval2, 0))) {
#if 0&&HAVE_BCMATH
if ((ret1==FLAG_IS_BC) || (ret2==FLAG_IS_BC)) {
bc_num first, second;
/* use the BC math library to compare the numbers */
init_num(&first);
init_num(&second);
str2num(&first, s1->value.str.val, 100); /* this scale should do */
str2num(&second, s2->value.str.val, 100); /* ditto */
result->value.lval = bc_compare(first, second);
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.lval);
result->type = IS_LONG;
free_num(&first);
free_num(&second);
} else
#endif
if ((ret1==IS_DOUBLE) || (ret2==IS_DOUBLE)) {
if (ret1!=IS_DOUBLE) {
dval1 = strtod(s1->value.str.val, NULL);
@@ -1906,15 +1921,6 @@ ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2 TSRMLS_DC)
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC)
{
result->type = IS_LONG;
if (Z_OBJ_HT_P(o1) != Z_OBJ_HT_P(o2)) {
result->value.lval = 1; /* Comparing objects of different types is pretty much meaningless */
return;
}
if (EG(ze1_compatibility_mode) && Z_OBJPROP_P(o1) && Z_OBJPROP_P(o2)) {
zend_compare_symbol_tables(result, Z_OBJPROP_P(o1), Z_OBJPROP_P(o2) TSRMLS_CC);
return;
}
if (Z_OBJ_HT_P(o1)->compare_objects == NULL) {
if (Z_OBJ_HANDLE_P(o1) == Z_OBJ_HANDLE_P(o2)) {
+4 -23
View File
@@ -87,6 +87,8 @@ static inline zend_bool is_numeric_string(char *str, int length, long *lval, dou
*lval = local_lval;
}
return IS_LONG;
} else if (end_ptr_long == str && *end_ptr_long != '\0') { /* ignore partial string matches */
return 0;
}
} else {
end_ptr_long=NULL;
@@ -98,9 +100,9 @@ static inline zend_bool is_numeric_string(char *str, int length, long *lval, dou
errno=0;
local_dval = strtod(str, &end_ptr_double);
if (errno!=ERANGE) {
if (errno != ERANGE) {
if (end_ptr_double == str+length) { /* floating point string */
if (! zend_finite(local_dval)) {
if (!zend_finite(local_dval)) {
/* "inf","nan" and maybe other weird ones */
return 0;
}
@@ -108,28 +110,7 @@ static inline zend_bool is_numeric_string(char *str, int length, long *lval, dou
if (dval) {
*dval = local_dval;
}
#if 0&&HAVE_BCMATH
if (length>16) {
register char *ptr=str, *end=str+length;
while (ptr<end) {
switch (*ptr++) {
case 'e':
case 'E':
/* scientific notation, not handled by the BC library */
return IS_DOUBLE;
break;
default:
break;
}
}
return FLAG_IS_BC;
} else {
return IS_DOUBLE;
}
#else
return IS_DOUBLE;
#endif
}
} else {
end_ptr_double=NULL;
+363 -144
View File
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -49,7 +49,7 @@ ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle TSR
return (handle->handle.fp) ? SUCCESS : FAILURE;
}
int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC)
ZEND_API int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC)
{
switch (file_handle->type) {
case ZEND_HANDLE_FILENAME:
@@ -90,7 +90,7 @@ int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC)
return SUCCESS;
}
size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC)
ZEND_API size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC)
{
if (file_handle->handle.stream.interactive) {
int c = '*', n;
@@ -105,7 +105,7 @@ size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSR
return file_handle->handle.stream.reader(file_handle->handle.stream.handle, buf, len TSRMLS_CC);
}
int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC)
ZEND_API int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC)
{
char buf;
@@ -115,7 +115,7 @@ int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC)
return EOF;
}
int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC)
ZEND_API int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC)
{
return 0;
}
+4 -4
View File
@@ -49,10 +49,10 @@ typedef struct _zend_file_handle {
BEGIN_EXTERN_C()
ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle TSRMLS_DC);
int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC);
int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC);
size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC);
int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC);
ZEND_API int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC);
ZEND_API int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC);
ZEND_API size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC);
ZEND_API int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC);
END_EXTERN_C()
#define zend_stream_close(handle) zend_file_handle_dtor((handle))
+6 -9
View File
@@ -140,25 +140,22 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
case IS_CONSTANT_ARRAY: {
zval *tmp;
HashTable *original_ht = zvalue->value.ht;
HashTable *tmp_ht = NULL;
TSRMLS_FETCH();
if (zvalue->value.ht == &EG(symbol_table)) {
return SUCCESS; /* do nothing */
}
ALLOC_HASHTABLE_REL(zvalue->value.ht);
zend_hash_init(zvalue->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(zvalue->value.ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
ALLOC_HASHTABLE_REL(tmp_ht);
zend_hash_init(tmp_ht, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
zvalue->value.ht = tmp_ht;
}
break;
case IS_OBJECT:
{
TSRMLS_FETCH();
if (EG(ze1_compatibility_mode)) {
zvalue->value.obj = zvalue->value.obj.handlers->clone_obj(zvalue TSRMLS_CC);
} else {
Z_OBJ_HT_P(zvalue)->add_ref(zvalue TSRMLS_CC);
}
Z_OBJ_HT_P(zvalue)->add_ref(zvalue TSRMLS_CC);
}
break;
}
+3 -1
View File
@@ -1794,7 +1794,6 @@ AC_DEFUN([PHP_SETUP_LIBXML], [
PHP_TEST_BUILD(xmlInitParser,
[
php_cv_libxml_build_works=yes
AC_DEFINE(HAVE_LIBXML, 1, [ ])
], [
AC_MSG_RESULT(no)
AC_MSG_ERROR([build test failed. Please check the config.log for details.])
@@ -1802,6 +1801,9 @@ AC_DEFUN([PHP_SETUP_LIBXML], [
[$]$1
])
])
if test "$php_cv_libxml_build_works" = "yes"; then
AC_DEFINE(HAVE_LIBXML, 1, [ ])
fi
$2
else
AC_MSG_ERROR([libxml2 version 2.5.10 or greater required.])
+12 -6
View File
@@ -40,8 +40,8 @@ AC_CONFIG_HEADER(main/php_config.h)
MAJOR_VERSION=5
MINOR_VERSION=0
RELEASE_VERSION=0
EXTRA_VERSION="RC1-dev"
RELEASE_VERSION=1
EXTRA_VERSION="RC1"
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
dnl Define where extension directories are located in the configure context
@@ -351,6 +351,7 @@ stdlib.h \
string.h \
syslog.h \
sysexits.h \
sys/ioctl.h \
sys/file.h \
sys/mman.h \
sys/mount.h \
@@ -364,6 +365,7 @@ sys/vfs.h \
sys/sysexits.h \
sys/varargs.h \
sys/wait.h \
termios.h \
unistd.h \
unix.h \
utime.h \
@@ -479,6 +481,7 @@ getservbyport \
getrusage \
gettimeofday \
gmtime_r \
grantpt \
inet_ntoa \
inet_ntop \
inet_pton \
@@ -494,6 +497,7 @@ mmap \
nl_langinfo \
perror \
poll \
ptsname \
putenv \
realpath \
random \
@@ -504,6 +508,7 @@ scandir \
setitimer \
setlocale \
localeconv \
setpgid \
setsockopt \
setvbuf \
shutdown \
@@ -524,6 +529,7 @@ strtok_r \
symlink \
tempnam \
tzset \
unlockpt \
unsetenv \
usleep \
nanosleep \
@@ -868,15 +874,15 @@ if test "$PHP_PEAR" != "no"; then
dnl
if test "$PHP_SAPI_CLI" = "no"; then
pear_error_msg="$pear_error_msg
PEAR requires CLI to be enabled. Add --enable-cli to the configure line."
PEAR requires CLI to be enabled. Add --enable-cli to the configure line. (or --disable-pear)"
fi
if test "$PHP_PCRE_REGEX" = "no"; then
pear_error_msg="$pear_error_msg
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line."
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. (or --disable-pear)"
fi
if test "$PHP_XML" = "no"; then
pear_error_msg="$pear_error_msg
PEAR requires XML to be enabled. Add --enable-xml to the configure line."
PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --disable-pear)"
fi
dnl
@@ -884,7 +890,7 @@ dnl ext/xmlrpc is not really there yet to be a requirement..
dnl
dnl if test "$PHP_XMLRPC" = "no"; then
dnl pear_error_msg="$pear_error_msg
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line."
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --disable-pear)"
dnl fi
dnl
+23 -5
View File
@@ -53,8 +53,8 @@ zend_module_entry bcmath_module_entry = {
bcmath_functions,
PHP_MINIT(bcmath),
PHP_MSHUTDOWN(bcmath),
NULL,
NULL,
PHP_RINIT(bcmath),
PHP_RSHUTDOWN(bcmath),
PHP_MINFO(bcmath),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
@@ -86,8 +86,6 @@ PHP_MINIT_FUNCTION(bcmath)
REGISTER_INI_ENTRIES();
bc_init_numbers(TSRMLS_C);
return SUCCESS;
}
/* }}} */
@@ -95,6 +93,26 @@ PHP_MINIT_FUNCTION(bcmath)
/* {{{ PHP_MSHUTDOWN_FUNCTION
*/
PHP_MSHUTDOWN_FUNCTION(bcmath)
{
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
/* }}} */
/* {{{ PHP_RINIT_FUNCTION
*/
PHP_RINIT_FUNCTION(bcmath)
{
bc_init_numbers(TSRMLS_C);
return SUCCESS;
}
/* }}} */
/* {{{ PHP_RSHUTDOWN_FUNCTION
*/
PHP_RSHUTDOWN_FUNCTION(bcmath)
{
_bc_free_num_ex(&BCG(_zero_), 1);
_bc_free_num_ex(&BCG(_one_), 1);
@@ -102,7 +120,7 @@ PHP_MSHUTDOWN_FUNCTION(bcmath)
return SUCCESS;
}
/* }}} */
/* }}} */
/* {{{ PHP_MINFO_FUNCTION
*/
+94
View File
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "../pear/package.dtd">
<package>
<name>bcmath</name>
<summary>Arbitrary Precision Mathematics Functions</summary>
<maintainers>
<maintainer>
<user>andi</user>
<name>Andi Gutmans</name>
<email>andi@php.net</email>
<role>lead</role>
</maintainer>
</maintainers>
<description>
For arbitrary precision mathematics PHP offers the Binary Calculator
which supports numbers of any size and precision, represented as strings.
</description>
<license>PHP</license>
<release>
<state>beta</state>
<version>5.0.0rc1</version>
<date>2004-03-19</date>
<notes>
package.xml added to support intallation using pear installer
</notes>
<filelist>
<file role="doc" name="CREDITS"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
<file role="src" name="bcmath.c"/>
<file role="src" name="php_bcmath.h"/>
<file role="src" name="number.c"/>
<file role="src" name="number.h"/>
<file role="doc" name="libbcmath/AUTHORS"/>
<file role="doc" name="libbcmath/COPYING.LIB"/>
<file role="doc" name="libbcmath/ChangeLog"/>
<file role="doc" name="libbcmath/FAQ"/>
<file role="doc" name="libbcmath/INSTALL"/>
<file role="doc" name="libbcmath/NEWS"/>
<file role="doc" name="libbcmath/README"/>
<file role="src" name="libbcmath/src/Makefile.am"/>
<file role="src" name="libbcmath/src/add.c"/>
<file role="src" name="libbcmath/src/bcmath.h"/>
<file role="src" name="libbcmath/src/compare.c"/>
<file role="src" name="libbcmath/src/config.h"/>
<file role="src" name="libbcmath/src/debug.c"/>
<file role="src" name="libbcmath/src/div.c"/>
<file role="src" name="libbcmath/src/divmod.c"/>
<file role="src" name="libbcmath/src/doaddsub.c"/>
<file role="src" name="libbcmath/src/init.c"/>
<file role="src" name="libbcmath/src/int2num.c"/>
<file role="src" name="libbcmath/src/nearzero.c"/>
<file role="src" name="libbcmath/src/neg.c"/>
<file role="src" name="libbcmath/src/num2long.c"/>
<file role="src" name="libbcmath/src/num2str.c"/>
<file role="src" name="libbcmath/src/outofmem.c"/>
<file role="src" name="libbcmath/src/output.c"/>
<file role="src" name="libbcmath/src/private.h"/>
<file role="src" name="libbcmath/src/raise.c"/>
<file role="src" name="libbcmath/src/raisemod.c"/>
<file role="src" name="libbcmath/src/recmul.c"/>
<file role="src" name="libbcmath/src/rmzero.c"/>
<file role="src" name="libbcmath/src/rt.c"/>
<file role="src" name="libbcmath/src/sqrt.c"/>
<file role="src" name="libbcmath/src/str2num.c"/>
<file role="src" name="libbcmath/src/sub.c"/>
<file role="src" name="libbcmath/src/zero.c"/>
<file role="src" name="libbcmath/Makefile.am"/>
<file role="src" name="libbcmath/acconfig.h"/>
<file role="src" name="libbcmath/aclocal.m4"/>
<file role="src" name="libbcmath/config.h.in"/>
<file role="src" name="libbcmath/configure"/>
<file role="src" name="libbcmath/configure.in"/>
<file role="src" name="libbcmath/install-sh"/>
<file role="src" name="libbcmath/missing"/>
<file role="src" name="libbcmath/mkinstalldirs"/>
<file role="test" name="tests/bcadd.phpt"/>
<file role="test" name="tests/bccomp.phpt"/>
<file role="test" name="tests/bcdiv.phpt"/>
<file role="test" name="tests/bcmod.phpt"/>
<file role="test" name="tests/bcmul.phpt"/>
<file role="test" name="tests/bcpow.phpt"/>
<file role="test" name="tests/bcscale.phpt"/>
<file role="test" name="tests/bcsqrt.phpt"/>
<file role="test" name="tests/bcsub.phpt"/>
</filelist>
<deps>
<dep type="php" rel="ge" version="5" />
</deps>
</release>
</package>
<!--
vim:et:ts=1:sw=1
-->
+2
View File
@@ -30,6 +30,8 @@ extern zend_module_entry bcmath_module_entry;
PHP_MINIT_FUNCTION(bcmath);
PHP_MSHUTDOWN_FUNCTION(bcmath);
PHP_RINIT_FUNCTION(bcmath);
PHP_RSHUTDOWN_FUNCTION(bcmath);
PHP_MINFO_FUNCTION(bcmath);
PHP_FUNCTION(bcadd);
+3
View File
@@ -23,6 +23,9 @@ Bz2 is an extension to create and parse bzip2 compressed data.
Initial Release in PECL
</notes>
</release>
<configureoptions>
<configureoption name="with-bz2" default="autodetect" prompt="path to bz2 installation?"/>
</configureoptions>
<filelist>
<dir role="src" name="/">
<file role="doc">CREDITS</file>
+7
View File
@@ -0,0 +1,7 @@
EXPORTS
BZ2_bzCompressInit
BZ2_bzCompress
BZ2_bzCompressEnd
BZ2_bzDecompressInit
BZ2_bzDecompress
BZ2_bzDecompressEnd
-2
View File
@@ -2,8 +2,6 @@
BZ2 with files
--SKIPIF--
<?php if (!extension_loaded("bz2")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?php // $Id$
-2
View File
@@ -2,8 +2,6 @@
BZ2 with strings
--SKIPIF--
<?php if (!extension_loaded("bz2")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?php // $Id$
+73
View File
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "../pear/package.dtd">
<package>
<name>calendar</name>
<summary>Date conversion between different calendar formats</summary>
<maintainers>
<maintainer>
<user>hholzgra</user>
<name>Hartmut Holzgraefe</name>
<email>hartmut@php.net</email>
<role>lead</role>
</maintainer>
<maintainer>
<user>shane</user>
<name>Shane Caraveo</name>
<role>developer</role>
<email>shane@caraveo.com</email>
</maintainer>
<maintainer>
<user>colin</user>
<name>Colin Viebrock</name>
<role>developer</role>
<email>colin@easydns.com</email>
</maintainer>
<maintainer>
<user>wez</user>
<name>Wez Furlong</name>
<role>developer</role>
<email>wez@php.net</email>
</maintainer>
</maintainers>
<description>
The calendar extension presents a series of functions to simplify
converting between different calendar formats. The intermediary or
standard it is based on is the Julian Day Count. The Julian Day Count
is a count of days starting from January 1st, 4713 B.C. To convert
between calendar systems, you must first convert to Julian Day Count,
then to the calendar system of your choice. Julian Day Count is very
different from the Julian Calendar!
</description>
<license>PHP</license>
<release>
<state>beta</state>
<version>5.0.0rc1</version>
<date>2004-03-19</date>
<notes>
package.xml added to support intallation using pear installer
</notes>
<filelist>
<file role="doc" name="CREDITS"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
<file role="src" name="cal_unix.c"/>
<file role="src" name="calendar.c"/>
<file role="src" name="dow.c"/>
<file role="src" name="easter.c"/>
<file role="src" name="french.c"/>
<file role="src" name="gregor.c"/>
<file role="src" name="jewish.c"/>
<file role="src" name="julian.c"/>
<file role="src" name="package.xml"/>
<file role="src" name="php_calendar.h"/>
<file role="src" name="sdncal.h"/>
<file role="test" name="tests/jdtojewish.phpt"/>
</filelist>
<deps>
<dep type="php" rel="ge" version="5" />
</deps>
</release>
</package>
<!--
vim:et:ts=1:sw=1
-->
-3
View File
@@ -65,9 +65,6 @@ $word->Quit();
TODO:
- Mapping PHP arrays as SafeArray's. This is currently not done.
Probably will implement this into $a = new variant($php_array, VT_ARRAY)
or something similar.
- documentation
* dotnet support requires that you have the mscoree.h header from the .net sdk
+69 -2
View File
@@ -37,7 +37,7 @@ PHP_FUNCTION(com_create_instance)
php_com_dotnet_object *obj;
char *module_name, *typelib_name = NULL, *server_name = NULL;
char *user_name = NULL, *domain_name = NULL, *password = NULL;
long module_name_len, typelib_name_len, server_name_len,
int module_name_len, typelib_name_len, server_name_len,
user_name_len, domain_name_len, password_len;
OLECHAR *moniker;
CLSID clsid;
@@ -281,6 +281,58 @@ PHP_FUNCTION(com_create_instance)
}
/* }}} */
/* {{{ proto object com_get_active_object(string progid [, int code_page ])
Returns a handle to an already running instance of a COM object */
PHP_FUNCTION(com_get_active_object)
{
CLSID clsid;
char *module_name;
int module_name_len;
long code_page = COMG(code_page);
IUnknown *unk = NULL;
IDispatch *obj = NULL;
HRESULT res;
OLECHAR *module = NULL;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l",
&module_name, &module_name_len, &code_page)) {
php_com_throw_exception(E_INVALIDARG, "Invalid arguments!" TSRMLS_CC);
return;
}
module = php_com_string_to_olestring(module_name, module_name_len, code_page TSRMLS_CC);
res = CLSIDFromString(module, &clsid);
if (FAILED(res)) {
php_com_throw_exception(res, NULL TSRMLS_CC);
} else {
res = GetActiveObject(&clsid, NULL, &unk);
if (FAILED(res)) {
php_com_throw_exception(res, NULL TSRMLS_CC);
} else {
res = IUnknown_QueryInterface(unk, &IID_IDispatch, &obj);
if (FAILED(res)) {
php_com_throw_exception(res, NULL TSRMLS_CC);
} else if (obj) {
/* we got our dispatchable object */
php_com_wrap_dispatch(return_value, obj, code_page TSRMLS_CC);
}
}
}
if (obj) {
IDispatch_Release(obj);
}
if (unk) {
IUnknown_Release(obj);
}
efree(module);
}
/* }}} */
/* Performs an Invoke on the given com object.
* returns a failure code and creates an exception if there was an error */
HRESULT php_com_invoke_helper(php_com_dotnet_object *obj, DISPID id_member,
@@ -333,6 +385,17 @@ HRESULT php_com_invoke_helper(php_com_dotnet_object *obj, DISPID id_member,
spprintf(&msg, 0, "Parameter %d: %s", arg_err, desc);
LocalFree(desc);
break;
case DISP_E_BADPARAMCOUNT:
if ((disp_params->cArgs + disp_params->cNamedArgs == 0) && (flags == DISPATCH_PROPERTYGET)) {
/* if getting a property and they are missing all parameters,
* we want to create a proxy object for them; so lets not create an
* exception here */
msg = NULL;
break;
}
/* else fall through */
default:
desc = php_win_err(hr);
spprintf(&msg, 0, "Error %s", desc);
@@ -557,6 +620,10 @@ int php_com_do_invoke_by_id(php_com_dotnet_object *obj, DISPID dispid,
efree(vargs);
}
/* a bit strange this, but... */
if (hr == DISP_E_BADPARAMCOUNT)
return hr;
return SUCCEEDED(hr) ? SUCCESS : FAILURE;
}
@@ -732,7 +799,7 @@ PHP_FUNCTION(com_message_pump)
PHP_FUNCTION(com_load_typelib)
{
char *name;
long namelen;
int namelen;
ITypeLib *pTL = NULL;
zend_bool cs = TRUE;
int codepage = COMG(code_page);
+8 -3
View File
@@ -98,10 +98,11 @@ PHP_FUNCTION(com_dotnet_create_instance)
zval *object = getThis();
php_com_dotnet_object *obj;
char *assembly_name, *datatype_name;
long assembly_name_len, datatype_name_len;
int assembly_name_len, datatype_name_len;
struct dotnet_runtime_stuff *stuff;
IObjectHandle *handle;
DISPPARAMS params;
OLECHAR *olestring;
VARIANT vargs[2];
VARIANT retval;
HRESULT hr;
@@ -138,10 +139,14 @@ PHP_FUNCTION(com_dotnet_create_instance)
VariantInit(&retval);
V_VT(&vargs[0]) = VT_BSTR;
V_BSTR(&vargs[0]) = php_com_string_to_olestring(datatype_name, datatype_name_len, obj->code_page TSRMLS_CC);
olestring = php_com_string_to_olestring(datatype_name, datatype_name_len, obj->code_page TSRMLS_CC);
V_BSTR(&vargs[0]) = SysAllocStringByteLen((char*)olestring, datatype_name_len * sizeof(OLECHAR));
efree(olestring);
V_VT(&vargs[1]) = VT_BSTR;
V_BSTR(&vargs[1]) = php_com_string_to_olestring(assembly_name, assembly_name_len, obj->code_page TSRMLS_CC);
olestring = php_com_string_to_olestring(assembly_name, assembly_name_len, obj->code_page TSRMLS_CC);
V_BSTR(&vargs[1]) = SysAllocStringByteLen((char*)olestring, assembly_name_len * sizeof(OLECHAR));
efree(olestring);
hr = IDispatch_Invoke(stuff->dotnet_domain, stuff->create_instance, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
DISPATCH_METHOD, &params, &retval, NULL, NULL);
+19 -5
View File
@@ -70,6 +70,7 @@ function_entry com_dotnet_functions[] = {
PHP_FE(com_print_typeinfo, NULL)
PHP_FE(com_message_pump, NULL)
PHP_FE(com_load_typelib, NULL)
PHP_FE(com_get_active_object, NULL)
{ NULL, NULL, NULL }
};
@@ -187,12 +188,13 @@ PHP_MINIT_FUNCTION(com_dotnet)
ZEND_INIT_MODULE_GLOBALS(com_dotnet, php_com_dotnet_init_globals, NULL);
REGISTER_INI_ENTRIES();
php_com_wrapper_minit(INIT_FUNC_ARGS_PASSTHRU);
php_com_wrapper_minit(INIT_FUNC_ARGS_PASSTHRU);
php_com_persist_minit(INIT_FUNC_ARGS_PASSTHRU);
INIT_CLASS_ENTRY(ce, "com_exception", NULL);
php_com_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
php_com_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
php_com_exception_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED;
// php_com_exception_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED;
INIT_CLASS_ENTRY(ce, "com_safearray_proxy", NULL);
php_com_saproxy_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
@@ -202,13 +204,11 @@ PHP_MINIT_FUNCTION(com_dotnet)
INIT_CLASS_ENTRY(ce, "variant", NULL);
ce.create_object = php_com_object_new;
// ce.get_iterator = php_com_iter_get;
php_com_variant_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
php_com_variant_class_entry->get_iterator = php_com_iter_get;
INIT_CLASS_ENTRY(ce, "com", NULL);
ce.create_object = php_com_object_new;
// ce.get_iterator = php_com_iter_get;
tmp = zend_register_internal_class_ex(&ce, php_com_variant_class_entry, "variant" TSRMLS_CC);
tmp->get_iterator = php_com_iter_get;
@@ -217,7 +217,6 @@ PHP_MINIT_FUNCTION(com_dotnet)
#if HAVE_MSCOREE_H
INIT_CLASS_ENTRY(ce, "dotnet", NULL);
ce.create_object = php_com_object_new;
// ce.get_iterator = php_com_iter_get;
tmp = zend_register_internal_class_ex(&ce, php_com_variant_class_entry, "variant" TSRMLS_CC);
tmp->get_iterator = php_com_iter_get;
#endif
@@ -231,9 +230,11 @@ PHP_MINIT_FUNCTION(com_dotnet)
COM_CONST(CLSCTX_SERVER);
COM_CONST(CLSCTX_ALL);
#if 0
COM_CONST(DISPATCH_METHOD);
COM_CONST(DISPATCH_PROPERTYGET);
COM_CONST(DISPATCH_PROPERTYPUT);
#endif
COM_CONST(VT_NULL);
COM_CONST(VT_EMPTY);
@@ -272,6 +273,19 @@ PHP_MINIT_FUNCTION(com_dotnet)
COM_CONST(VARCMP_GT);
COM_CONST(VARCMP_NULL);
COM_CONST(NORM_IGNORECASE);
COM_CONST(NORM_IGNORENONSPACE);
COM_CONST(NORM_IGNORESYMBOLS);
COM_CONST(NORM_IGNOREWIDTH);
COM_CONST(NORM_IGNOREKANATYPE);
#ifdef NORM_IGNOREKASHIDA
COM_CONST(NORM_IGNOREKASHIDA);
#endif
COM_CONST(DISP_E_DIVBYZERO);
COM_CONST(DISP_E_OVERFLOW);
COM_CONST(DISP_E_BADINDEX);
COM_CONST(MK_E_UNAVAILABLE);
return SUCCESS;
}
/* }}} */
+107 -23
View File
@@ -29,11 +29,12 @@
#include "php_com_dotnet_internal.h"
#include "Zend/zend_exceptions.h"
static zval *com_property_read(zval *object, zval *member, zend_bool silent TSRMLS_DC)
static zval *com_property_read(zval *object, zval *member, int type TSRMLS_DC)
{
zval *return_value;
php_com_dotnet_object *obj;
VARIANT v;
HRESULT res;
MAKE_STD_ZVAL(return_value);
ZVAL_NULL(return_value);
@@ -46,15 +47,18 @@ static zval *com_property_read(zval *object, zval *member, zend_bool silent TSRM
VariantInit(&v);
convert_to_string_ex(&member);
if (SUCCESS == php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member),
DISPATCH_PROPERTYGET, &v, 0, NULL TSRMLS_CC)) {
res = php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member),
DISPATCH_PROPERTYGET, &v, 0, NULL TSRMLS_CC);
if (res == SUCCESS) {
php_com_zval_from_variant(return_value, &v, obj->code_page TSRMLS_CC);
VariantClear(&v);
} else if (res == DISP_E_BADPARAMCOUNT) {
php_com_saproxy_create(object, return_value, member TSRMLS_CC);
}
} else {
if (!silent) {
php_com_throw_exception(E_INVALIDARG, "this variant has no properties" TSRMLS_CC);
}
php_com_throw_exception(E_INVALIDARG, "this variant has no properties" TSRMLS_CC);
}
return return_value;
@@ -139,7 +143,7 @@ static zval *com_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
VariantClear(&v);
}
} else {
php_com_saproxy_create(object, return_value, Z_LVAL_P(offset) TSRMLS_CC);
php_com_saproxy_create(object, return_value, offset TSRMLS_CC);
}
} else {
@@ -154,6 +158,7 @@ static void com_write_dimension(zval *object, zval *offset, zval *value TSRMLS_D
php_com_dotnet_object *obj;
zval *args[2];
VARIANT v;
HRESULT res;
obj = CDNO_FETCH(object);
@@ -172,12 +177,47 @@ static void com_write_dimension(zval *object, zval *offset, zval *value TSRMLS_D
DISPATCH_METHOD|DISPATCH_PROPERTYPUT, &v, 2, args TSRMLS_CC)) {
VariantClear(&v);
}
} else if (V_ISARRAY(&obj->v)) {
LONG indices = 0;
VARTYPE vt;
if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) {
if (FAILED(SafeArrayGetVartype(V_ARRAY(&obj->v), &vt)) || vt == VT_EMPTY) {
vt = V_VT(&obj->v) & ~VT_ARRAY;
}
convert_to_long(offset);
indices = Z_LVAL_P(offset);
VariantInit(&v);
php_com_variant_from_zval(&v, value, obj->code_page TSRMLS_CC);
if (V_VT(&v) != vt) {
VariantChangeType(&v, &v, 0, vt);
}
if (vt == VT_VARIANT) {
res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v);
} else {
res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v.lVal);
}
VariantClear(&v);
if (FAILED(res)) {
php_com_throw_exception(res, NULL TSRMLS_CC);
}
} else {
php_com_throw_exception(DISP_E_BADINDEX, "this variant has multiple dimensions; you can't set a new value without specifying *all* dimensions" TSRMLS_CC);
}
} else {
/* TODO: check for safearray */
php_com_throw_exception(E_INVALIDARG, "this variant is not an array type" TSRMLS_CC);
}
}
#if 0
static void com_object_set(zval **property, zval *value TSRMLS_DC)
{
/* Not yet implemented in the engine */
@@ -188,6 +228,7 @@ static zval *com_object_get(zval *property TSRMLS_DC)
/* Not yet implemented in the engine */
return NULL;
}
#endif
static int com_property_exists(zval *object, zval *member, int check_empty TSRMLS_DC)
{
@@ -245,11 +286,19 @@ static void function_dtor(void *pDest)
}
}
static PHP_FUNCTION(com_method_handler)
{
Z_OBJ_HANDLER_P(getThis(), call_method)(
((zend_internal_function*)EG(function_state_ptr)->function)->function_name,
INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
static union _zend_function *com_method_get(zval *object, char *name, int len TSRMLS_DC)
{
zend_internal_function f, *fptr = NULL;
php_com_dotnet_object *obj;
union _zend_function *func;
DISPID dummy;
obj = CDNO_FETCH(object);
@@ -257,6 +306,10 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
return NULL;
}
if (FAILED(php_com_get_id_of_name(obj, name, len, &dummy TSRMLS_CC))) {
return NULL;
}
/* check cache */
if (obj->method_cache == NULL || FAILURE == zend_hash_find(obj->method_cache, name, len, (void**)&fptr)) {
f.type = ZEND_OVERLOADED_FUNCTION;
@@ -265,7 +318,10 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
f.scope = obj->ce;
f.fn_flags = 0;
f.function_name = estrndup(name, len);
f.handler = PHP_FN(com_method_handler);
fptr = &f;
if (obj->typeinfo) {
/* look for byref params */
ITypeComp *comp;
@@ -305,6 +361,9 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
case DESCKIND_TYPECOMP:
ITypeComp_Release(bindptr.lptcomp);
break;
case DESCKIND_NONE:
break;
}
if (TI) {
ITypeInfo_Release(TI);
@@ -315,21 +374,27 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
}
}
/* save this method in the cache */
if (!obj->method_cache) {
ALLOC_HASHTABLE(obj->method_cache);
zend_hash_init(obj->method_cache, 2, NULL, function_dtor, 0);
}
if (fptr) {
/* save this method in the cache */
if (!obj->method_cache) {
ALLOC_HASHTABLE(obj->method_cache);
zend_hash_init(obj->method_cache, 2, NULL, function_dtor, 0);
}
zend_hash_update(obj->method_cache, name, len, &f, sizeof(f), (void**)&fptr);
zend_hash_update(obj->method_cache, name, len, &f, sizeof(f), (void**)&fptr);
}
}
/* duplicate this into a new chunk of emalloc'd memory,
* since the engine will efree it */
func = emalloc(sizeof(*fptr));
memcpy(func, fptr, sizeof(*fptr));
if (fptr) {
/* duplicate this into a new chunk of emalloc'd memory,
* since the engine will efree it */
func = emalloc(sizeof(*fptr));
memcpy(func, fptr, sizeof(*fptr));
return func;
return func;
}
return NULL;
}
static int com_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS)
@@ -507,6 +572,25 @@ static int com_object_cast(zval *readobj, zval *writeobj, int type, int should_f
return SUCCESS;
}
static int com_object_count(zval *object, long *count TSRMLS_DC)
{
php_com_dotnet_object *obj;
LONG ubound = 0, lbound = 0;
obj = CDNO_FETCH(object);
if (!V_ISARRAY(&obj->v)) {
return FAILURE;
}
SafeArrayGetLBound(V_ARRAY(&obj->v), 1, &lbound);
SafeArrayGetUBound(V_ARRAY(&obj->v), 1, &ubound);
*count = ubound - lbound + 1;
return SUCCESS;
}
zend_object_handlers php_com_object_handlers = {
ZEND_OBJECTS_STORE_HANDLERS,
com_property_read,
@@ -514,8 +598,8 @@ zend_object_handlers php_com_object_handlers = {
com_read_dimension,
com_write_dimension,
NULL,
com_object_get,
com_object_set,
NULL, //com_object_get,
NULL, //com_object_set,
com_property_exists,
com_property_delete,
com_dimension_exists,
@@ -527,7 +611,8 @@ zend_object_handlers php_com_object_handlers = {
com_class_entry_get,
com_class_name_get,
com_objects_compare,
com_object_cast
com_object_cast,
com_object_count
};
void php_com_object_enable_event_sink(php_com_dotnet_object *obj, int enable TSRMLS_DC)
@@ -616,7 +701,6 @@ zend_object_value php_com_object_new(zend_class_entry *ce TSRMLS_DC)
obj->code_page = CP_ACP;
obj->ce = ce;
retval.handle = zend_objects_store_put(obj, NULL, php_com_object_free_storage, php_com_object_clone TSRMLS_CC);
retval.handlers = &php_com_object_handlers;
+2 -2
View File
@@ -38,7 +38,7 @@ void php_com_throw_exception(HRESULT code, char *message TSRMLS_DC)
}
zend_throw_exception(php_com_exception_class_entry, message, (long)code TSRMLS_CC);
if (free_msg) {
efree(message);
LocalFree(message);
}
}
@@ -118,7 +118,7 @@ PHPAPI int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1 T
/* check bounds */
if (dim1 < lbound || dim1 > ubound) {
php_com_throw_exception(E_INVALIDARG, "index out of bounds" TSRMLS_CC);
php_com_throw_exception(DISP_E_BADINDEX, "index out of bounds" TSRMLS_CC);
return 0;
}
+789
View File
@@ -0,0 +1,789 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2004 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
/* Infrastructure for working with persistent COM objects.
* Implements: IStream* wrapper for PHP streams.
* TODO: Magic __wakeup and __sleep handlers for serialization
* (can wait till 5.1) */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_com_dotnet.h"
#include "php_com_dotnet_internal.h"
#include "Zend/zend_exceptions.h"
/* {{{ expose php_stream as a COM IStream */
typedef struct {
CONST_VTBL struct IStreamVtbl *lpVtbl;
THREAD_T engine_thread;
LONG refcount;
php_stream *stream;
int id;
} php_istream;
static int le_istream;
static void istream_destructor(php_istream *stm);
static void istream_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
php_istream *stm = (php_istream *)rsrc->ptr;
istream_destructor(stm);
}
#define FETCH_STM() \
php_istream *stm = (php_istream*)This; \
if (tsrm_thread_id() != stm->engine_thread) \
return E_UNEXPECTED;
static HRESULT STDMETHODCALLTYPE stm_queryinterface(
IStream *This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject)
{
TSRMLS_FETCH();
FETCH_STM();
if (IsEqualGUID(&IID_IUnknown, riid) ||
IsEqualGUID(&IID_IStream, riid)) {
*ppvObject = This;
InterlockedIncrement(&stm->refcount);
return S_OK;
}
*ppvObject = NULL;
return E_NOINTERFACE;
}
static ULONG STDMETHODCALLTYPE stm_addref(IStream *This)
{
TSRMLS_FETCH();
FETCH_STM();
return InterlockedIncrement(&stm->refcount);
}
static ULONG STDMETHODCALLTYPE stm_release(IStream *This)
{
ULONG ret;
TSRMLS_FETCH();
FETCH_STM();
ret = InterlockedDecrement(&stm->refcount);
if (ret == 0) {
/* destroy it */
if (stm->id)
zend_list_delete(stm->id);
}
return ret;
}
static HRESULT STDMETHODCALLTYPE stm_read(IStream *This, void *pv, ULONG cb, ULONG *pcbRead)
{
int nread;
TSRMLS_FETCH();
FETCH_STM();
nread = php_stream_read(stm->stream, pv, cb);
if (pcbRead) {
*pcbRead = nread > 0 ? nread : 0;
}
if (nread > 0) {
return S_OK;
}
return S_FALSE;
}
static HRESULT STDMETHODCALLTYPE stm_write(IStream *This, void const *pv, ULONG cb, ULONG *pcbWritten)
{
int nwrote;
TSRMLS_FETCH();
FETCH_STM();
nwrote = php_stream_write(stm->stream, pv, cb);
if (pcbWritten) {
*pcbWritten = nwrote > 0 ? nwrote : 0;
}
if (nwrote > 0) {
return S_OK;
}
return S_FALSE;
}
static HRESULT STDMETHODCALLTYPE stm_seek(IStream *This, LARGE_INTEGER dlibMove,
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
{
off_t offset;
int whence;
int ret;
TSRMLS_FETCH();
FETCH_STM();
switch (dwOrigin) {
case STREAM_SEEK_SET: whence = SEEK_SET; break;
case STREAM_SEEK_CUR: whence = SEEK_CUR; break;
case STREAM_SEEK_END: whence = SEEK_END; break;
default:
return STG_E_INVALIDFUNCTION;
}
if (dlibMove.HighPart) {
/* we don't support 64-bit offsets */
return STG_E_INVALIDFUNCTION;
}
offset = dlibMove.QuadPart;
ret = php_stream_seek(stm->stream, offset, whence);
if (plibNewPosition) {
plibNewPosition->QuadPart = (ULONGLONG)(ret >= 0 ? ret : 0);
}
return ret >= 0 ? S_OK : STG_E_INVALIDFUNCTION;
}
static HRESULT STDMETHODCALLTYPE stm_set_size(IStream *This, ULARGE_INTEGER libNewSize)
{
TSRMLS_FETCH();
FETCH_STM();
if (libNewSize.HighPart) {
return STG_E_INVALIDFUNCTION;
}
if (php_stream_truncate_supported(stm->stream)) {
int ret = php_stream_truncate_set_size(stm->stream, (size_t)libNewSize.QuadPart);
if (ret == 0) {
return S_OK;
}
}
return STG_E_INVALIDFUNCTION;
}
static HRESULT STDMETHODCALLTYPE stm_copy_to(IStream *This, IStream *pstm, ULARGE_INTEGER cb,
ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
{
TSRMLS_FETCH();
FETCH_STM();
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE stm_commit(IStream *This, DWORD grfCommitFlags)
{
TSRMLS_FETCH();
FETCH_STM();
php_stream_flush(stm->stream);
return S_OK;
}
static HRESULT STDMETHODCALLTYPE stm_revert(IStream *This)
{
/* NOP */
return S_OK;
}
static HRESULT STDMETHODCALLTYPE stm_lock_region(IStream *This,
ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD lockType)
{
return STG_E_INVALIDFUNCTION;
}
static HRESULT STDMETHODCALLTYPE stm_unlock_region(IStream *This,
ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD lockType)
{
return STG_E_INVALIDFUNCTION;
}
static HRESULT STDMETHODCALLTYPE stm_stat(IStream *This,
STATSTG *pstatstg, DWORD grfStatFlag)
{
return STG_E_INVALIDFUNCTION;
}
static HRESULT STDMETHODCALLTYPE stm_clone(IStream *This, IStream **ppstm)
{
return STG_E_INVALIDFUNCTION;
}
static struct IStreamVtbl php_istream_vtbl = {
stm_queryinterface,
stm_addref,
stm_release,
stm_read,
stm_write,
stm_seek,
stm_set_size,
stm_copy_to,
stm_commit,
stm_revert,
stm_lock_region,
stm_unlock_region,
stm_stat,
stm_clone
};
static void istream_destructor(php_istream *stm)
{
TSRMLS_FETCH();
if (stm->id) {
int id = stm->id;
stm->id = 0;
zend_list_delete(id);
return;
}
if (stm->refcount > 0) {
CoDisconnectObject((IUnknown*)stm, 0);
}
zend_list_delete(stm->stream->rsrc_id);
CoTaskMemFree(stm);
}
/* }}} */
PHPAPI IStream *php_com_wrapper_export_stream(php_stream *stream TSRMLS_DC)
{
php_istream *stm = (php_istream*)CoTaskMemAlloc(sizeof(*stm));
if (stm == NULL)
return NULL;
memset(stm, 0, sizeof(*stm));
stm->engine_thread = tsrm_thread_id();
stm->lpVtbl = &php_istream_vtbl;
stm->refcount = 1;
stm->stream = stream;
zend_list_addref(stream->rsrc_id);
stm->id = zend_list_insert(stm, le_istream);
return (IStream*)stm;
}
#define CPH_ME(fname, arginfo) PHP_ME(com_persist, fname, arginfo, ZEND_ACC_PUBLIC)
#define CPH_SME(fname, arginfo) PHP_ME(com_persist, fname, arginfo, ZEND_ACC_ALLOW_STATIC|ZEND_ACC_PUBLIC)
#define CPH_METHOD(fname) static PHP_METHOD(com_persist, fname)
#define CPH_FETCH() php_com_persist_helper *helper = (php_com_persist_helper*)zend_object_store_get_object(getThis() TSRMLS_CC);
#define CPH_NO_OBJ() if (helper->unk == NULL) { php_com_throw_exception(E_INVALIDARG, "No COM object is associated with this helper instance" TSRMLS_CC); return; }
typedef struct {
zend_object std;
long codepage;
IUnknown *unk;
IPersistStream *ips;
IPersistStreamInit *ipsi;
IPersistFile *ipf;
} php_com_persist_helper;
static zend_object_handlers helper_handlers;
static zend_class_entry *helper_ce;
static inline HRESULT get_persist_stream(php_com_persist_helper *helper)
{
if (!helper->ips && helper->unk) {
return IUnknown_QueryInterface(helper->unk, &IID_IPersistStream, &helper->ips);
}
return helper->ips ? S_OK : E_NOTIMPL;
}
static inline HRESULT get_persist_stream_init(php_com_persist_helper *helper)
{
if (!helper->ipsi && helper->unk) {
return IUnknown_QueryInterface(helper->unk, &IID_IPersistStreamInit, &helper->ipsi);
}
return helper->ipsi ? S_OK : E_NOTIMPL;
}
static inline HRESULT get_persist_file(php_com_persist_helper *helper)
{
if (!helper->ipf && helper->unk) {
return IUnknown_QueryInterface(helper->unk, &IID_IPersistFile, &helper->ipf);
}
return helper->ipf ? S_OK : E_NOTIMPL;
}
/* {{{ proto string COMPersistHelper::GetCurFile()
Determines the filename into which an object will be saved, or false if none is set, via IPersistFile::GetCurFile */
CPH_METHOD(GetCurFileName)
{
HRESULT res;
OLECHAR *olename = NULL;
CPH_FETCH();
CPH_NO_OBJ();
res = get_persist_file(helper);
if (helper->ipf) {
res = IPersistFile_GetCurFile(helper->ipf, &olename);
if (res == S_OK) {
Z_TYPE_P(return_value) = IS_STRING;
Z_STRVAL_P(return_value) = php_com_olestring_to_string(olename,
&Z_STRLEN_P(return_value), helper->codepage TSRMLS_CC);
CoTaskMemFree(olename);
return;
} else if (res == S_FALSE) {
CoTaskMemFree(olename);
RETURN_FALSE;
}
php_com_throw_exception(res, NULL TSRMLS_CC);
} else {
php_com_throw_exception(res, NULL TSRMLS_CC);
}
}
/* }}} */
/* {{{ proto bool COMPersistHelper::SaveToFile(string filename [, bool remember])
Persist object data to file, via IPersistFile::Save */
CPH_METHOD(SaveToFile)
{
HRESULT res;
char *filename, *fullpath = NULL;
int filename_len;
zend_bool remember = TRUE;
OLECHAR *olefilename = NULL;
CPH_FETCH();
CPH_NO_OBJ();
res = get_persist_file(helper);
if (helper->ipf) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!|b",
&filename, &filename_len, &remember)) {
php_com_throw_exception(E_INVALIDARG, "Invalid arguments" TSRMLS_CC);
return;
}
if (filename) {
fullpath = expand_filepath(filename, NULL TSRMLS_CC);
if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
RETURN_FALSE;
}
olefilename = php_com_string_to_olestring(filename, strlen(fullpath), helper->codepage TSRMLS_CC);
efree(fullpath);
}
res = IPersistFile_Save(helper->ipf, olefilename, remember);
if (SUCCEEDED(res)) {
if (!olefilename) {
res = IPersistFile_GetCurFile(helper->ipf, &olefilename);
if (S_OK == res) {
IPersistFile_SaveCompleted(helper->ipf, olefilename);
CoTaskMemFree(olefilename);
olefilename = NULL;
}
} else if (remember) {
IPersistFile_SaveCompleted(helper->ipf, olefilename);
}
}
if (olefilename) {
efree(olefilename);
}
if (FAILED(res)) {
php_com_throw_exception(res, NULL TSRMLS_CC);
}
} else {
php_com_throw_exception(res, NULL TSRMLS_CC);
}
}
/* }}} */
/* {{{ proto bool COMPersistHelper::LoadFromFile(string filename [, int flags])
Load object data from file, via IPersistFile::Load */
CPH_METHOD(LoadFromFile)
{
HRESULT res;
char *filename, *fullpath;
int filename_len;
long flags = 0;
OLECHAR *olefilename;
CPH_FETCH();
CPH_NO_OBJ();
res = get_persist_file(helper);
if (helper->ipf) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l",
&filename, &filename_len, &flags)) {
php_com_throw_exception(E_INVALIDARG, "Invalid arguments" TSRMLS_CC);
return;
}
fullpath = expand_filepath(filename, NULL TSRMLS_CC);
if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
RETURN_FALSE;
}
olefilename = php_com_string_to_olestring(fullpath, strlen(fullpath), helper->codepage TSRMLS_CC);
efree(fullpath);
res = IPersistFile_Load(helper->ipf, olefilename, flags);
efree(olefilename);
if (FAILED(res)) {
php_com_throw_exception(res, NULL TSRMLS_CC);
}
} else {
php_com_throw_exception(res, NULL TSRMLS_CC);
}
}
/* }}} */
/* {{{ proto int COMPersistHelper::GetMaxStreamSize()
Gets maximum stream size required to store the object data, via IPersistStream::GetSizeMax (or IPersistStreamInit::GetSizeMax) */
CPH_METHOD(GetMaxStreamSize)
{
HRESULT res;
ULARGE_INTEGER size;
CPH_FETCH();
CPH_NO_OBJ();
res = get_persist_stream_init(helper);
if (helper->ipsi) {
res = IPersistStreamInit_GetSizeMax(helper->ipsi, &size);
} else {
res = get_persist_stream(helper);
if (helper->ips) {
res = IPersistStream_GetSizeMax(helper->ips, &size);
} else {
php_com_throw_exception(res, NULL TSRMLS_CC);
return;
}
}
if (res != S_OK) {
php_com_throw_exception(res, NULL TSRMLS_CC);
} else {
/* TODO: handle 64 bit properly */
RETURN_LONG((LONG)size.QuadPart);
}
}
/* }}} */
/* {{{ proto int COMPersistHelper::InitNew()
Initializes the object to a default state, via IPersistStreamInit::InitNew */
CPH_METHOD(InitNew)
{
HRESULT res;
CPH_FETCH();
CPH_NO_OBJ();
res = get_persist_stream_init(helper);
if (helper->ipsi) {
res = IPersistStreamInit_InitNew(helper->ipsi);
if (res != S_OK) {
php_com_throw_exception(res, NULL TSRMLS_CC);
} else {
RETURN_TRUE;
}
} else {
php_com_throw_exception(res, NULL TSRMLS_CC);
}
}
/* }}} */
/* {{{ proto mixed COMPersistHelper::LoadFromStream(resource stream)
Initializes an object from the stream where it was previously saved, via IPersistStream::Load or OleLoadFromStream */
CPH_METHOD(LoadFromStream)
{
zval *zstm;
php_stream *stream;
IStream *stm = NULL;
HRESULT res;
CPH_FETCH();
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zstm)) {
php_com_throw_exception(E_INVALIDARG, "invalid arguments" TSRMLS_CC);
return;
}
php_stream_from_zval_no_verify(stream, &zstm);
if (stream == NULL) {
php_com_throw_exception(E_INVALIDARG, "expected a stream" TSRMLS_CC);
return;
}
stm = php_com_wrapper_export_stream(stream TSRMLS_CC);
if (stm == NULL) {
php_com_throw_exception(E_UNEXPECTED, "failed to wrap stream" TSRMLS_CC);
return;
}
res = S_OK;
RETVAL_TRUE;
if (helper->unk == NULL) {
IDispatch *disp = NULL;
/* we need to create an object and load using OleLoadFromStream */
res = OleLoadFromStream(stm, &IID_IDispatch, &disp);
if (SUCCEEDED(res)) {
php_com_wrap_dispatch(return_value, disp, COMG(code_page) TSRMLS_CC);
}
} else {
res = get_persist_stream_init(helper);
if (helper->ipsi) {
res = IPersistStreamInit_Load(helper->ipsi, stm);
} else {
res = get_persist_stream(helper);
if (helper->ips) {
res = IPersistStreamInit_Load(helper->ipsi, stm);
}
}
}
IStream_Release(stm);
if (FAILED(res)) {
php_com_throw_exception(res, NULL TSRMLS_CC);
RETURN_NULL();
}
}
/* }}} */
/* {{{ proto int COMPersistHelper::SaveToStream(resource stream)
Saves the object to a stream, via IPersistStream::Save */
CPH_METHOD(SaveToStream)
{
zval *zstm;
php_stream *stream;
IStream *stm = NULL;
HRESULT res;
CPH_FETCH();
CPH_NO_OBJ();
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zstm)) {
php_com_throw_exception(E_INVALIDARG, "invalid arguments" TSRMLS_CC);
return;
}
php_stream_from_zval_no_verify(stream, &zstm);
if (stream == NULL) {
php_com_throw_exception(E_INVALIDARG, "expected a stream" TSRMLS_CC);
return;
}
stm = php_com_wrapper_export_stream(stream TSRMLS_CC);
if (stm == NULL) {
php_com_throw_exception(E_UNEXPECTED, "failed to wrap stream" TSRMLS_CC);
return;
}
res = get_persist_stream_init(helper);
if (helper->ipsi) {
res = IPersistStreamInit_Save(helper->ipsi, stm, TRUE);
} else {
res = get_persist_stream(helper);
if (helper->ips) {
res = IPersistStream_Save(helper->ips, stm, TRUE);
}
}
IStream_Release(stm);
if (FAILED(res)) {
php_com_throw_exception(res, NULL TSRMLS_CC);
return;
}
RETURN_TRUE;
}
/* }}} */
/* {{{ proto int COMPersistHelper::__construct([object com_object])
Creates a persistence helper object, usually associated with a com_object */
CPH_METHOD(__construct)
{
php_com_dotnet_object *obj = NULL;
zval *zobj = NULL;
CPH_FETCH();
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|O!",
&zobj, php_com_variant_class_entry)) {
php_com_throw_exception(E_INVALIDARG, "invalid arguments" TSRMLS_CC);
return;
}
if (!zobj) {
return;
}
obj = CDNO_FETCH(zobj);
if (V_VT(&obj->v) != VT_DISPATCH || V_DISPATCH(&obj->v) == NULL) {
php_com_throw_exception(E_INVALIDARG, "parameter must represent an IDispatch COM object" TSRMLS_CC);
return;
}
/* it is always safe to cast an interface to IUnknown */
helper->unk = (IUnknown*)V_DISPATCH(&obj->v);
IUnknown_AddRef(helper->unk);
helper->codepage = obj->code_page;
}
/* }}} */
static zend_function_entry com_persist_helper_methods[] = {
CPH_ME(__construct, NULL)
CPH_ME(GetCurFileName, NULL)
CPH_ME(SaveToFile, NULL)
CPH_ME(LoadFromFile, NULL)
CPH_ME(GetMaxStreamSize, NULL)
CPH_ME(InitNew, NULL)
CPH_ME(LoadFromStream, NULL)
CPH_ME(SaveToStream, NULL)
{NULL, NULL, NULL}
};
static void helper_free_storage(void *obj TSRMLS_DC)
{
php_com_persist_helper *object = (php_com_persist_helper*)obj;
if (object->ipf) {
IPersistFile_Release(object->ipf);
}
if (object->ips) {
IPersistStream_Release(object->ips);
}
if (object->ipsi) {
IPersistStreamInit_Release(object->ipsi);
}
if (object->unk) {
IUnknown_Release(object->unk);
}
zend_hash_destroy(object->std.properties);
FREE_HASHTABLE(object->std.properties);
efree(object);
}
static void helper_clone(void *obj, void **clone_ptr TSRMLS_DC)
{
php_com_persist_helper *clone, *object = (php_com_persist_helper*)obj;
zval *tmp;
clone = emalloc(sizeof(*object));
memcpy(clone, object, sizeof(*object));
*clone_ptr = clone;
ALLOC_HASHTABLE(clone->std.properties);
zend_hash_init(clone->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
if (clone->ipf) {
IPersistFile_AddRef(clone->ipf);
}
if (clone->ips) {
IPersistStream_AddRef(clone->ips);
}
if (clone->ipsi) {
IPersistStreamInit_AddRef(clone->ipsi);
}
if (clone->unk) {
IUnknown_AddRef(clone->unk);
}
}
static zend_object_value helper_new(zend_class_entry *ce TSRMLS_DC)
{
php_com_persist_helper *helper;
zend_object_value retval;
zval *tmp;
helper = emalloc(sizeof(*helper));
memset(helper, 0, sizeof(*helper));
ALLOC_HASHTABLE(helper->std.properties);
zend_hash_init(helper->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
helper->std.ce = helper_ce;
retval.handle = zend_objects_store_put(helper, NULL, helper_free_storage, helper_clone TSRMLS_CC);
retval.handlers = &helper_handlers;
return retval;
}
int php_com_persist_minit(INIT_FUNC_ARGS)
{
zend_class_entry ce;
memcpy(&helper_handlers, zend_get_std_object_handlers(), sizeof(helper_handlers));
helper_handlers.clone_obj = NULL;
INIT_CLASS_ENTRY(ce, "COMPersistHelper", com_persist_helper_methods);
ce.create_object = helper_new;
helper_ce = zend_register_internal_class(&ce TSRMLS_CC);
helper_ce->ce_flags |= ZEND_ACC_FINAL;
le_istream = zend_register_list_destructors_ex(istream_dtor,
NULL, "com_dotnet_istream_wrapper", module_number);
return SUCCESS;
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
+185 -31
View File
@@ -20,7 +20,9 @@
/* This module implements a SafeArray proxy which is used internally
* by the engine when resolving multi-dimensional array accesses on
* SafeArray types
* SafeArray types.
* In addition, the proxy is now able to handle properties of COM objects
* that smell like PHP arrays.
* */
#ifdef HAVE_CONFIG_H
@@ -43,7 +45,7 @@ typedef struct {
LONG dimensions;
/* this is an array whose size_is(dimensions) */
LONG *indices;
zval **indices;
} php_com_saproxy;
@@ -58,16 +60,25 @@ typedef struct {
#define SA_FETCH(zv) (php_com_saproxy*)zend_object_store_get_object(zv TSRMLS_CC)
static zval *saproxy_property_read(zval *object, zval *member, zend_bool silent TSRMLS_DC)
static inline void clone_indices(php_com_saproxy *dest, php_com_saproxy *src, int ndims)
{
int i;
for (i = 0; i < ndims; i++) {
MAKE_STD_ZVAL(dest->indices[i]);
*dest->indices[i] = *src->indices[i];
zval_copy_ctor(dest->indices[i]);
}
}
static zval *saproxy_property_read(zval *object, zval *member, int type TSRMLS_DC)
{
zval *return_value;
MAKE_STD_ZVAL(return_value);
ZVAL_NULL(return_value);
if (!silent) {
php_com_throw_exception(E_INVALIDARG, "safearray has no properties" TSRMLS_CC);
}
php_com_throw_exception(E_INVALIDARG, "safearray has no properties" TSRMLS_CC);
return return_value;
}
@@ -84,15 +95,50 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
UINT dims;
SAFEARRAY *sa;
LONG ubound, lbound;
int i;
HRESULT res;
MAKE_STD_ZVAL(return_value);
ZVAL_NULL(return_value);
if (!V_ISARRAY(&proxy->obj->v)) {
php_com_throw_exception(E_INVALIDARG, "proxied object is no longer a safe array!" TSRMLS_CC);
if (V_VT(&proxy->obj->v) == VT_DISPATCH) {
VARIANT v;
zval **args;
/* prop-get using first dimension as the property name,
* all subsequent dimensions and the offset as parameters */
args = safe_emalloc(proxy->dimensions + 1, sizeof(zval *), 0);
for (i = 1; i < proxy->dimensions; i++) {
args[i-1] = proxy->indices[i];
}
args[i-1] = offset;
convert_to_string(proxy->indices[0]);
VariantInit(&v);
res = php_com_do_invoke(proxy->obj, Z_STRVAL_P(proxy->indices[0]),
Z_STRLEN_P(proxy->indices[0]), DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v,
proxy->dimensions, args TSRMLS_CC);
if (res == SUCCESS) {
php_com_zval_from_variant(return_value, &v, proxy->obj->code_page TSRMLS_CC);
VariantClear(&v);
} else if (res == DISP_E_BADPARAMCOUNT) {
/* return another proxy */
php_com_saproxy_create(object, return_value, offset TSRMLS_CC);
}
return return_value;
} else if (!V_ISARRAY(&proxy->obj->v)) {
php_com_throw_exception(E_INVALIDARG, "invalid read from com proxy object" TSRMLS_CC);
return return_value;
}
/* the SafeArray case */
/* offset/index must be an integer */
convert_to_long(offset);
@@ -110,7 +156,7 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
SafeArrayGetUBound(sa, proxy->dimensions, &ubound);
if (Z_LVAL_P(offset) < lbound || Z_LVAL_P(offset) > ubound) {
php_com_throw_exception(E_INVALIDARG, "index out of bounds" TSRMLS_CC);
php_com_throw_exception(DISP_E_BADINDEX, "index out of bounds" TSRMLS_CC);
return return_value;
}
@@ -122,10 +168,13 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
VariantInit(&v);
/* we can return a real value */
indices = do_alloca(dims * sizeof(LONG));
indices = emalloc(dims * sizeof(LONG));
/* copy indices from proxy */
memcpy(indices, proxy->indices, (dims-1) * sizeof(LONG));
for (i = 0; i < dims; i++) {
convert_to_long(proxy->indices[i]);
indices[i] = Z_LVAL_P(proxy->indices[i]);
}
/* add user-supplied index */
indices[dims-1] = Z_LVAL_P(offset);
@@ -136,21 +185,25 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
}
if (vt == VT_VARIANT) {
SafeArrayGetElement(sa, indices, &v);
res = SafeArrayGetElement(sa, indices, &v);
} else {
V_VT(&v) = vt;
SafeArrayGetElement(sa, indices, &v.lVal);
res = SafeArrayGetElement(sa, indices, &v.lVal);
}
free_alloca(indices);
efree(indices);
php_com_wrap_variant(return_value, &v, proxy->obj->code_page TSRMLS_CC);
if (SUCCEEDED(res)) {
php_com_wrap_variant(return_value, &v, proxy->obj->code_page TSRMLS_CC);
} else {
php_com_throw_exception(res, NULL TSRMLS_CC);
}
VariantClear(&v);
} else {
/* return another proxy */
php_com_saproxy_create(object, return_value, Z_LVAL_P(offset) TSRMLS_CC);
php_com_saproxy_create(object, return_value, offset TSRMLS_CC);
}
return return_value;
@@ -158,9 +211,79 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type TSRMLS_
static void saproxy_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC)
{
php_com_throw_exception(E_NOTIMPL, "writing to safearray not yet implemented" TSRMLS_CC);
php_com_saproxy *proxy = SA_FETCH(object);
UINT dims;
int i;
HRESULT res;
VARIANT v;
if (V_VT(&proxy->obj->v) == VT_DISPATCH) {
/* We do a prop-set using the first dimension as the property name,
* all subsequent dimensions and offset as parameters, with value as
* the final value */
zval **args = safe_emalloc(proxy->dimensions + 2, sizeof(zval *), 0);
for (i = 1; i < proxy->dimensions; i++) {
args[i-1] = proxy->indices[i];
}
args[i-1] = offset;
args[i] = value;
convert_to_string(proxy->indices[0]);
VariantInit(&v);
if (SUCCESS == php_com_do_invoke(proxy->obj, Z_STRVAL_P(proxy->indices[0]),
Z_STRLEN_P(proxy->indices[0]), DISPATCH_PROPERTYPUT, &v, proxy->dimensions + 1,
args TSRMLS_CC)) {
VariantClear(&v);
}
efree(args);
} else if (V_ISARRAY(&proxy->obj->v)) {
LONG *indices;
VARTYPE vt;
dims = SafeArrayGetDim(V_ARRAY(&proxy->obj->v));
indices = emalloc(dims * sizeof(LONG));
/* copy indices from proxy */
for (i = 0; i < dims; i++) {
convert_to_long(proxy->indices[i]);
indices[i] = Z_LVAL_P(proxy->indices[i]);
}
/* add user-supplied index */
convert_to_long(offset);
indices[dims-1] = Z_LVAL_P(offset);
if (FAILED(SafeArrayGetVartype(V_ARRAY(&proxy->obj->v), &vt)) || vt == VT_EMPTY) {
vt = V_VT(&proxy->obj->v) & ~VT_ARRAY;
}
VariantInit(&v);
php_com_variant_from_zval(&v, value, proxy->obj->code_page TSRMLS_CC);
if (V_VT(&v) != vt) {
VariantChangeType(&v, &v, 0, vt);
}
if (vt == VT_VARIANT) {
res = SafeArrayPutElement(V_ARRAY(&proxy->obj->v), indices, &v);
} else {
res = SafeArrayPutElement(V_ARRAY(&proxy->obj->v), indices, &v.lVal);
}
efree(indices);
VariantClear(&v);
if (FAILED(res)) {
php_com_throw_exception(res, NULL TSRMLS_CC);
}
} else {
php_com_throw_exception(E_NOTIMPL, "invalid write to com proxy object" TSRMLS_CC);
}
}
#if 0
static void saproxy_object_set(zval **property, zval *value TSRMLS_DC)
{
}
@@ -170,6 +293,7 @@ static zval *saproxy_object_get(zval *property TSRMLS_DC)
/* Not yet implemented in the engine */
return NULL;
}
#endif
static int saproxy_property_exists(zval *object, zval *member, int check_empty TSRMLS_DC)
{
@@ -212,7 +336,7 @@ static int saproxy_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS)
static union _zend_function *saproxy_constructor_get(zval *object TSRMLS_DC)
{
/* user cannot instanciate */
/* user cannot instantiate */
return NULL;
}
@@ -238,6 +362,23 @@ static int saproxy_object_cast(zval *readobj, zval *writeobj, int type, int shou
return FAILURE;
}
static int saproxy_count_elements(zval *object, long *count TSRMLS_DC)
{
php_com_saproxy *proxy = SA_FETCH(object);
LONG ubound, lbound;
if (!V_ISARRAY(&proxy->obj->v)) {
return FAILURE;
}
SafeArrayGetLBound(V_ARRAY(&proxy->obj->v), proxy->dimensions, &lbound);
SafeArrayGetUBound(V_ARRAY(&proxy->obj->v), proxy->dimensions, &ubound);
*count = ubound - lbound + 1;
return SUCCESS;
}
zend_object_handlers php_com_saproxy_handlers = {
ZEND_OBJECTS_STORE_HANDLERS,
saproxy_property_read,
@@ -245,8 +386,8 @@ zend_object_handlers php_com_saproxy_handlers = {
saproxy_read_dimension,
saproxy_write_dimension,
NULL,
saproxy_object_get,
saproxy_object_set,
NULL, //saproxy_object_get,
NULL, //saproxy_object_set,
saproxy_property_exists,
saproxy_property_delete,
saproxy_dimension_exists,
@@ -258,12 +399,20 @@ zend_object_handlers php_com_saproxy_handlers = {
saproxy_class_entry_get,
saproxy_class_name_get,
saproxy_objects_compare,
saproxy_object_cast
saproxy_object_cast,
saproxy_count_elements
};
static void saproxy_free_storage(void *object TSRMLS_DC)
{
php_com_saproxy *proxy = (php_com_saproxy *)object;
int i;
for (i = 0; i < proxy->dimensions; i++) {
if (proxy->indices) {
FREE_ZVAL(proxy->indices[i]);
}
}
zval_ptr_dtor(&proxy->zobj);
efree(proxy->indices);
@@ -279,38 +428,39 @@ static void saproxy_clone(void *object, void **clone_ptr TSRMLS_DC)
memcpy(cloneproxy, proxy, sizeof(*cloneproxy));
ZVAL_ADDREF(cloneproxy->zobj);
cloneproxy->indices = safe_emalloc(cloneproxy->dimensions, sizeof(LONG), 0);
memcpy(cloneproxy->indices, proxy->indices, cloneproxy->dimensions * sizeof(LONG));
cloneproxy->indices = safe_emalloc(cloneproxy->dimensions, sizeof(zval *), 0);
clone_indices(cloneproxy, proxy, proxy->dimensions);
*clone_ptr = cloneproxy;
}
int php_com_saproxy_create(zval *com_object, zval *proxy_out, long index TSRMLS_DC)
int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index TSRMLS_DC)
{
php_com_saproxy *proxy, *rel = NULL;
php_com_dotnet_object *obj;
proxy = ecalloc(1, sizeof(*proxy));
proxy->dimensions = 1;
if (Z_OBJCE_P(com_object) == php_com_saproxy_class_entry) {
rel = SA_FETCH(com_object);
obj = rel->obj;
proxy->obj = rel->obj;
proxy->zobj = rel->zobj;
proxy->dimensions += rel->dimensions;
} else {
obj = CDNO_FETCH(com_object);
proxy->obj = CDNO_FETCH(com_object);
proxy->zobj = com_object;
}
ZVAL_ADDREF(proxy->zobj);
proxy->indices = safe_emalloc(proxy->dimensions, sizeof(LONG), 0);
proxy->indices = safe_emalloc(proxy->dimensions, sizeof(zval *), 0);
if (rel) {
memcpy(proxy->indices, rel->indices, (proxy->dimensions-1) * sizeof(LONG));
clone_indices(proxy, rel, rel->dimensions);
}
proxy->indices[proxy->dimensions-1] = index;
MAKE_STD_ZVAL(proxy->indices[proxy->dimensions-1]);
*proxy->indices[proxy->dimensions-1] = *index;
zval_copy_ctor(proxy->indices[proxy->dimensions-1]);
Z_TYPE_P(proxy_out) = IS_OBJECT;
Z_OBJ_HANDLE_P(proxy_out) = zend_objects_store_put(proxy, NULL, saproxy_free_storage, saproxy_clone TSRMLS_CC);
@@ -408,6 +558,7 @@ zend_object_iterator *php_com_saproxy_iter_get(zend_class_entry *ce, zval *objec
{
php_com_saproxy *proxy = SA_FETCH(object);
php_com_saproxy_iter *I;
int i;
I = ecalloc(1, sizeof(*I));
I->iter.funcs = &saproxy_iter_funcs;
@@ -418,7 +569,10 @@ zend_object_iterator *php_com_saproxy_iter_get(zend_class_entry *ce, zval *objec
ZVAL_ADDREF(I->proxy_obj);
I->indices = safe_emalloc(proxy->dimensions + 1, sizeof(LONG), 0);
memcpy(I->indices, proxy->indices, proxy->dimensions * sizeof(LONG));
for (i = 0; i < proxy->dimensions; i++) {
convert_to_long(proxy->indices[i]);
I->indices[i] = Z_LVAL_P(proxy->indices[i]);
}
SafeArrayGetLBound(V_ARRAY(&proxy->obj->v), proxy->dimensions, &I->imin);
SafeArrayGetUBound(V_ARRAY(&proxy->obj->v), proxy->dimensions, &I->imax);
+1 -1
View File
@@ -489,7 +489,7 @@ int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int pri
unsigned int funcdesclen, cnames = 0;
BSTR *names;
names = (BSTR*)emalloc((func->cParams + 1) * sizeof(BSTR));
names = (BSTR*)safe_emalloc((func->cParams + 1), sizeof(BSTR), 0);
ITypeInfo_GetNames(typeinfo, func->memid, names, func->cParams + 1, &cnames);
/* first element is the function name */
+93 -32
View File
@@ -28,6 +28,76 @@
#include "php_com_dotnet.h"
#include "php_com_dotnet_internal.h"
/* create an automation SafeArray from a PHP array.
* Only creates a single-dimensional array of variants.
* The keys of the PHP hash MUST be numeric. If the array
* is sparse, then the gaps will be filled with NULL variants */
static void safe_array_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
{
SAFEARRAY *sa = NULL;
SAFEARRAYBOUND bound;
HashPosition pos;
int keytype;
char *strindex;
int strindexlen;
long intindex;
long max_index = 0;
VARIANT *va;
zval **item;
/* find the largest array index, and assert that all keys are integers */
zend_hash_internal_pointer_reset_ex(HASH_OF(z), &pos);
for (;; zend_hash_move_forward_ex(HASH_OF(z), &pos)) {
keytype = zend_hash_get_current_key_ex(HASH_OF(z), &strindex, &strindexlen, &intindex, 0, &pos);
if (HASH_KEY_IS_STRING == keytype) {
goto bogus;
} else if (HASH_KEY_NON_EXISTANT == keytype) {
break;
}
if (intindex > max_index) {
max_index = intindex;
}
}
/* allocate the structure */
bound.lLbound = 0;
bound.cElements = intindex + 1;
sa = SafeArrayCreate(VT_VARIANT, 1, &bound);
/* get a lock on the array itself */
SafeArrayAccessData(sa, &va);
va = (VARIANT*)sa->pvData;
/* now fill it in */
zend_hash_internal_pointer_reset_ex(HASH_OF(z), &pos);
for (;; zend_hash_move_forward_ex(HASH_OF(z), &pos)) {
if (FAILURE == zend_hash_get_current_data_ex(HASH_OF(z), (void**)&item, &pos)) {
break;
}
zend_hash_get_current_key_ex(HASH_OF(z), &strindex, &strindexlen, &intindex, 0, &pos);
php_com_variant_from_zval(&va[intindex], *item, codepage TSRMLS_CC);
}
/* Unlock it and stuff it into our variant */
SafeArrayUnaccessData(sa);
V_VT(v) = VT_ARRAY|VT_VARIANT;
V_ARRAY(v) = sa;
return;
bogus:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "COM: converting from PHP array to VARIANT array; only arrays with numeric keys are allowed");
V_VT(v) = VT_NULL;
if (sa) {
SafeArrayUnlock(sa);
SafeArrayDestroy(sa);
}
}
PHPAPI void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
{
OLECHAR *olestring;
@@ -66,8 +136,8 @@ PHPAPI void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_D
break;
case IS_ARRAY:
V_VT(v) = VT_NULL;
/* TODO: map as safe array ? */
/* map as safe array */
safe_array_from_zval(v, z, codepage TSRMLS_CC);
break;
case IS_LONG:
@@ -190,7 +260,7 @@ PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC
/* {{{ com_variant_create_instance - ctor for new VARIANT() */
PHP_FUNCTION(com_variant_create_instance)
{
VARTYPE vt = VT_EMPTY;
/* VARTYPE == unsigned short */ long vt = VT_EMPTY;
long codepage = CP_ACP;
zval *object = getThis();
php_com_dotnet_object *obj;
@@ -214,11 +284,13 @@ PHP_FUNCTION(com_variant_create_instance)
obj->code_page = codepage;
}
php_com_variant_from_zval(&obj->v, zvalue, obj->code_page TSRMLS_CC);
if (zvalue) {
php_com_variant_from_zval(&obj->v, zvalue, obj->code_page TSRMLS_CC);
}
if (ZEND_NUM_ARGS() >= 2) {
res = VariantChangeType(&obj->v, &obj->v, 0, vt);
res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt);
if (FAILED(res)) {
char *werr, *msg;
@@ -240,7 +312,7 @@ PHP_FUNCTION(com_variant_create_instance)
/* }}} */
/* {{{ proto void variant_set(object variant, mixed value)
Assigns a new value for a variant object (like "set" in VB) */
Assigns a new value for a variant object */
PHP_FUNCTION(variant_set)
{
zval *zobj, *zvalue = NULL;
@@ -371,6 +443,8 @@ static void variant_binary_operation(enum variant_binary_opcode op, INTERNAL_FUN
if (SUCCEEDED(result)) {
php_com_wrap_variant(return_value, &vres, codepage TSRMLS_CC);
} else {
php_com_throw_exception(result, NULL TSRMLS_CC);
}
VariantClear(&vres);
@@ -396,7 +470,7 @@ PHP_FUNCTION(variant_cat)
/* }}} */
/* {{{ proto mixed variant_sub(mixed left, mixed right)
subjects the value of the right variant from the left variant value and returns the result */
subtracts the value of the right variant from the left variant value and returns the result */
PHP_FUNCTION(variant_sub)
{
variant_binary_operation(VOP_SUB, INTERNAL_FUNCTION_PARAM_PASSTHRU);
@@ -436,7 +510,7 @@ PHP_FUNCTION(variant_eqv)
/* }}} */
/* {{{ proto mixed variant_idiv(mixed left, mixed right)
Converts variants to operands and then returns the result from dividing them */
Converts variants to integers and then returns the result from dividing them */
PHP_FUNCTION(variant_idiv)
{
variant_binary_operation(VOP_IDIV, INTERNAL_FUNCTION_PARAM_PASSTHRU);
@@ -528,6 +602,8 @@ static void variant_unary_operation(enum variant_unary_opcode op, INTERNAL_FUNCT
if (SUCCEEDED(result)) {
php_com_wrap_variant(return_value, &vres, codepage TSRMLS_CC);
} else {
php_com_throw_exception(result, NULL TSRMLS_CC);
}
VariantClear(&vres);
@@ -544,7 +620,7 @@ PHP_FUNCTION(variant_abs)
/* }}} */
/* {{{ proto mixed variant_fix(mixed left)
Returns the ? of a variant */
Returns the integer part ? of a variant */
PHP_FUNCTION(variant_fix)
{
variant_unary_operation(VOP_FIX, INTERNAL_FUNCTION_PARAM_PASSTHRU);
@@ -712,7 +788,7 @@ PHP_FUNCTION(variant_date_to_timestamp)
Returns a variant date representation of a unix timestamp */
PHP_FUNCTION(variant_date_from_timestamp)
{
int timestamp;
long timestamp;
SYSTEMTIME systime;
struct tm *tmv;
VARIANT res;
@@ -723,7 +799,8 @@ PHP_FUNCTION(variant_date_from_timestamp)
}
VariantInit(&res);
tmv = gmtime(&timestamp);
tzset();
tmv = localtime(&timestamp);
memset(&systime, 0, sizeof(systime));
systime.wDay = tmv->tm_mday;
@@ -754,7 +831,7 @@ PHP_FUNCTION(variant_get_type)
return;
}
obj = CDNO_FETCH(zobj);
RETURN_LONG(V_VT(&obj->v));
}
/* }}} */
@@ -765,7 +842,7 @@ PHP_FUNCTION(variant_set_type)
{
zval *zobj;
php_com_dotnet_object *obj;
VARTYPE vt;
/* VARTYPE == unsigned short */ long vt;
HRESULT res;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
@@ -774,7 +851,7 @@ PHP_FUNCTION(variant_set_type)
}
obj = CDNO_FETCH(zobj);
res = VariantChangeType(&obj->v, &obj->v, 0, vt);
res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt);
if (SUCCEEDED(res)) {
if (vt != VT_DISPATCH && obj->typeinfo) {
@@ -800,7 +877,7 @@ PHP_FUNCTION(variant_cast)
{
zval *zobj;
php_com_dotnet_object *obj;
VARTYPE vt;
/* VARTYPE == unsigned short */ long vt;
VARIANT vres;
HRESULT res;
@@ -811,7 +888,7 @@ PHP_FUNCTION(variant_cast)
obj = CDNO_FETCH(zobj);
VariantInit(&vres);
res = VariantChangeType(&vres, &obj->v, 0, vt);
res = VariantChangeType(&vres, &obj->v, 0, (VARTYPE)vt);
if (SUCCEEDED(res)) {
php_com_wrap_variant(return_value, &vres, obj->code_page TSRMLS_CC);
@@ -830,19 +907,3 @@ PHP_FUNCTION(variant_cast)
}
/* }}} */
/* {{{ proto mixed variant_index_get(object variant, mixed index1 [, mixed index2 [, ...]])
Get the value of a multi dimensional array property */
PHP_FUNCTION(variant_index_get)
{
zval *zobj;
php_com_dotnet_object *obj;
if (FAILURE == zend_parse_parameters(1 TSRMLS_CC,
"O", &zobj, php_com_variant_class_entry)) {
return;
}
obj = CDNO_FETCH(zobj);
/* TODO: finish... */
}
/* }}} */
+16 -14
View File
@@ -272,7 +272,7 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
/* convert args into zvals.
* Args are in reverse order */
params = (zval ***)emalloc(sizeof(zval **) * pdp->cArgs);
params = (zval ***)safe_emalloc(sizeof(zval **), pdp->cArgs, 0);
for (i = 0; i < pdp->cArgs; i++) {
VARIANT *arg;
zval *zarg;
@@ -296,12 +296,16 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
} else if (wFlags & DISPATCH_PROPERTYPUT) {
zend_update_property(Z_OBJCE_P(disp->object), disp->object, Z_STRVAL_PP(name), Z_STRLEN_PP(name)+1, *params[0] TSRMLS_CC);
} else if (wFlags & DISPATCH_METHOD) {
if (SUCCESS == call_user_function_ex(EG(function_table), &disp->object, *name,
&retval, pdp->cArgs, params, 1, NULL TSRMLS_CC)) {
ret = S_OK;
} else {
zend_try {
if (SUCCESS == call_user_function_ex(EG(function_table), &disp->object, *name,
&retval, pdp->cArgs, params, 1, NULL TSRMLS_CC)) {
ret = S_OK;
} else {
ret = DISP_E_EXCEPTION;
}
} zend_catch {
ret = DISP_E_EXCEPTION;
}
} zend_end_try();
} else {
trace("Don't know how to handle this invocation %08x\n", wFlags);
}
@@ -314,14 +318,8 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
/* return value */
if (retval) {
if (pvarRes) {
if (Z_TYPE_P(retval) == IS_OBJECT) {
/* export the object using a dispatch like ourselves */
VariantInit(pvarRes);
V_VT(pvarRes) = VT_DISPATCH;
V_DISPATCH(pvarRes) = php_com_wrapper_export(retval TSRMLS_CC);
} else {
php_com_variant_from_zval(pvarRes, retval, COMG(code_page) TSRMLS_CC);
}
VariantInit(pvarRes);
php_com_variant_from_zval(pvarRes, retval, COMG(code_page) TSRMLS_CC);
}
zval_ptr_dtor(&retval);
} else if (pvarRes) {
@@ -344,6 +342,8 @@ static HRESULT STDMETHODCALLTYPE disp_deletememberbyname(
FETCH_DISP("DeleteMemberByName");
/* TODO: unset */
return S_FALSE;
}
@@ -355,6 +355,8 @@ static HRESULT STDMETHODCALLTYPE disp_deletememberbydispid(
FETCH_DISP("DeleteMemberByDispID");
/* TODO: unset */
return S_FALSE;
}
+1 -1
View File
@@ -7,7 +7,7 @@ if (PHP_COM_DOTNET == "yes") {
CHECK_LIB('oleaut32.lib', 'com_dotnet');
EXTENSION("com_dotnet", "com_com.c com_dotnet.c com_extension.c \
com_handlers.c com_iterator.c com_misc.c com_olechar.c \
com_typeinfo.c com_variant.c com_wrapper.c com_saproxy.c");
com_typeinfo.c com_variant.c com_wrapper.c com_saproxy.c com_persist.c");
AC_DEFINE('HAVE_COM_DOTNET', 1, 'Have COM_DOTNET support');
CHECK_HEADER_ADD_INCLUDE('mscoree.h', 'CFLAGS_COM_DOTNET');
}
+52
View File
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "../pear/package.dtd">
<package>
<name>com_dotnet</name>
<summary>Com and .NET support functions for Windows</summary>
<maintainers>
<maintainer>
<user>wez</user>
<name>Wez Furlong</name>
<email>wez@php.net</email>
<role>lead</role>
</maintainer>
</maintainers>
<description>
...
</description>
<license>PHP</license>
<release>
<state>beta</state>
<version>5.0.0rc1</version>
<date>2004-03-19</date>
<notes>
package.xml added to support intallation using pear installer
</notes>
<filelist>
<file role="doc" name="CREDITS"/>
<file role="doc" name="README"/>
<file role="src" name="config.w32"/>
<file role="src" name="com_com.c"/>
<file role="src" name="com_dotnet.c"/>
<file role="src" name="com_extension.c"/>
<file role="src" name="com_handlers.c"/>
<file role="src" name="com_misc.c"/>
<file role="src" name="com_olechar.c"/>
<file role="src" name="com_typeinfo.c"/>
<file role="src" name="com_variant.c"/>
<file role="src" name="com_iterator.c"/>
<file role="src" name="com_saproxy.c"/>
<file role="src" name="com_wrapper.c"/>
<file role="src" name="php_com_dotnet.h"/>
<file role="src" name="php_com_dotnet_internal.h"/>
<file role="test" name="tests/variants.phpt"/>
</filelist>
<deps>
<dep type="php" rel="ge" version="5" />
<!-- doesn't work yet <dep type="os" rel="has" name="windows"/> -->
</deps>
</release>
</package>
<!--
vim:et:ts=1:sw=1
-->
+6 -2
View File
@@ -36,7 +36,7 @@ typedef struct _php_com_dotnet_object {
VARIANT v;
ITypeInfo *typeinfo;
int code_page;
long code_page;
unsigned int have_default_bind:1;
zend_class_entry *ce;
@@ -83,7 +83,7 @@ void php_com_object_enable_event_sink(php_com_dotnet_object *obj, int enable TSR
/* com_saproxy.c */
zend_object_iterator *php_com_saproxy_iter_get(zend_class_entry *ce, zval *object TSRMLS_DC);
int php_com_saproxy_create(zval *com_object, zval *proxy_out, long index TSRMLS_DC);
int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index TSRMLS_DC);
/* com_olechar.c */
PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring,
@@ -99,6 +99,7 @@ PHP_FUNCTION(com_create_guid);
PHP_FUNCTION(com_print_typeinfo);
PHP_FUNCTION(com_message_pump);
PHP_FUNCTION(com_load_typelib);
PHP_FUNCTION(com_get_active_object);
HRESULT php_com_invoke_helper(php_com_dotnet_object *obj, DISPID id_member,
WORD flags, DISPPARAMS *disp_params, VARIANT *v TSRMLS_DC);
@@ -116,6 +117,9 @@ int php_com_wrapper_minit(INIT_FUNC_ARGS);
PHPAPI IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid, HashTable *id_to_name TSRMLS_DC);
PHPAPI IDispatch *php_com_wrapper_export(zval *val TSRMLS_DC);
/* com_persist.c */
int php_com_persist_minit(INIT_FUNC_ARGS);
/* com_variant.c */
PHP_FUNCTION(com_variant_create_instance);
PHP_FUNCTION(variant_set);
+43
View File
@@ -0,0 +1,43 @@
--TEST--
COM: mapping a safearray
--SKIPIF--
<?php # vim:ft=php
if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; ?>
--FILE--
<?php // $Id$
error_reporting(E_ALL);
try {
$v = new VARIANT(array("123", "456", "789"));
var_dump($v);
print $v[0] . "\n";
print $v[1] . "\n";
print $v[2] . "\n";
$v[1] = "hello";
foreach ($v as $item) {
var_dump($item);
}
try {
$v[3] = "shouldn't work";
} catch (com_exception $e) {
if ($e->getCode() != DISP_E_BADINDEX) {
throw $e;
}
echo "Got BADINDEX exception OK!\n";
}
echo "OK!";
} catch (Exception $e) {
print $e;
}
?>
--EXPECT--
object(variant)#1 (0) {
}
123
456
789
string(3) "123"
string(5) "hello"
string(3) "789"
Got BADINDEX exception OK!
OK!
+470 -94
View File
@@ -19,14 +19,22 @@ $binary_ops = array('add', 'cat', 'sub', 'mul', 'and', 'div',
foreach ($values as $t => $val) {
$v = new VARIANT($val);
if ($t != variant_get_type($v)) {
printf("Bork: [%d] %d: %s\n", $t, variant_get_type($v), (string)$v);
printf("Bork: [%d] %d: %s\n", $t, variant_get_type($v), $val);
print $v . "\n";
}
$results = array();
foreach ($values as $op2) {
echo "--\n";
foreach ($binary_ops as $op) {
echo "$op: " . call_user_func('variant_' . $op, $v, $op2) . "\n";
try {
echo "$op: " . call_user_func('variant_' . $op, $v, $op2) . "\n";
} catch (com_exception $e) {
echo "$op:\n";
echo "\tvariant_$op($v, $op2)\n";
echo "\texception " . $e->getMessage();
printf("\tcode %08x\n\n", $e->getCode());
}
}
}
}
@@ -63,30 +71,90 @@ or: 46
pow: 480145.116863642
xor: 46
--
add:
add:
variant_add(42, hello)
exception Type mismatch.
code 80020005
cat: 42hello
sub:
mul:
and:
div:
eqv:
idiv:
imp:
mod:
or:
pow:
xor:
sub:
variant_sub(42, hello)
exception Type mismatch.
code 80020005
mul:
variant_mul(42, hello)
exception Type mismatch.
code 80020005
and:
variant_and(42, hello)
exception Type mismatch.
code 80020005
div:
variant_div(42, hello)
exception Type mismatch.
code 80020005
eqv:
variant_eqv(42, hello)
exception Type mismatch.
code 80020005
idiv:
variant_idiv(42, hello)
exception Type mismatch.
code 80020005
imp:
variant_imp(42, hello)
exception Type mismatch.
code 80020005
mod:
variant_mod(42, hello)
exception Type mismatch.
code 80020005
or:
variant_or(42, hello)
exception Type mismatch.
code 80020005
pow:
variant_pow(42, hello)
exception Type mismatch.
code 80020005
xor:
variant_xor(42, hello)
exception Type mismatch.
code 80020005
--
add: 42
cat: 42False
sub: 42
mul: 0
and: 0
div:
div:
variant_div(42, )
exception Division by zero.
code 80020012
eqv: -43
idiv:
idiv:
variant_idiv(42, )
exception Division by zero.
code 80020012
imp: -43
mod:
mod:
variant_mod(42, )
exception Division by zero.
code 80020012
or: 42
pow: 1
xor: 42
@@ -119,89 +187,337 @@ or: 4
pow: 80.2117802289664
xor: 0
--
add:
add:
variant_add(3.5, hello)
exception Type mismatch.
code 80020005
cat: 3.5hello
sub:
mul:
and:
div:
eqv:
idiv:
imp:
mod:
or:
pow:
xor:
sub:
variant_sub(3.5, hello)
exception Type mismatch.
code 80020005
mul:
variant_mul(3.5, hello)
exception Type mismatch.
code 80020005
and:
variant_and(3.5, hello)
exception Type mismatch.
code 80020005
div:
variant_div(3.5, hello)
exception Type mismatch.
code 80020005
eqv:
variant_eqv(3.5, hello)
exception Type mismatch.
code 80020005
idiv:
variant_idiv(3.5, hello)
exception Type mismatch.
code 80020005
imp:
variant_imp(3.5, hello)
exception Type mismatch.
code 80020005
mod:
variant_mod(3.5, hello)
exception Type mismatch.
code 80020005
or:
variant_or(3.5, hello)
exception Type mismatch.
code 80020005
pow:
variant_pow(3.5, hello)
exception Type mismatch.
code 80020005
xor:
variant_xor(3.5, hello)
exception Type mismatch.
code 80020005
--
add: 3.5
cat: 3.5False
sub: 3.5
mul: 0
and: 0
div:
div:
variant_div(3.5, )
exception Division by zero.
code 80020012
eqv: -5
idiv:
idiv:
variant_idiv(3.5, )
exception Division by zero.
code 80020012
imp: -5
mod:
mod:
variant_mod(3.5, )
exception Division by zero.
code 80020012
or: 4
pow: 1
xor: 4
--
add:
add:
variant_add(hello, 42)
exception Type mismatch.
code 80020005
cat: hello42
sub:
mul:
and:
div:
eqv:
idiv:
imp:
mod:
or:
pow:
xor:
sub:
variant_sub(hello, 42)
exception Type mismatch.
code 80020005
mul:
variant_mul(hello, 42)
exception Type mismatch.
code 80020005
and:
variant_and(hello, 42)
exception Type mismatch.
code 80020005
div:
variant_div(hello, 42)
exception Type mismatch.
code 80020005
eqv:
variant_eqv(hello, 42)
exception Type mismatch.
code 80020005
idiv:
variant_idiv(hello, 42)
exception Type mismatch.
code 80020005
imp:
variant_imp(hello, 42)
exception Type mismatch.
code 80020005
mod:
variant_mod(hello, 42)
exception Type mismatch.
code 80020005
or:
variant_or(hello, 42)
exception Type mismatch.
code 80020005
pow:
variant_pow(hello, 42)
exception Type mismatch.
code 80020005
xor:
variant_xor(hello, 42)
exception Type mismatch.
code 80020005
--
add:
add:
variant_add(hello, 3.5)
exception Type mismatch.
code 80020005
cat: hello3.5
sub:
mul:
and:
div:
eqv:
idiv:
imp:
mod:
or:
pow:
xor:
sub:
variant_sub(hello, 3.5)
exception Type mismatch.
code 80020005
mul:
variant_mul(hello, 3.5)
exception Type mismatch.
code 80020005
and:
variant_and(hello, 3.5)
exception Type mismatch.
code 80020005
div:
variant_div(hello, 3.5)
exception Type mismatch.
code 80020005
eqv:
variant_eqv(hello, 3.5)
exception Type mismatch.
code 80020005
idiv:
variant_idiv(hello, 3.5)
exception Type mismatch.
code 80020005
imp:
variant_imp(hello, 3.5)
exception Type mismatch.
code 80020005
mod:
variant_mod(hello, 3.5)
exception Type mismatch.
code 80020005
or:
variant_or(hello, 3.5)
exception Type mismatch.
code 80020005
pow:
variant_pow(hello, 3.5)
exception Type mismatch.
code 80020005
xor:
variant_xor(hello, 3.5)
exception Type mismatch.
code 80020005
--
add: hellohello
cat: hellohello
sub:
mul:
and:
div:
eqv:
idiv:
imp:
mod:
or:
pow:
xor:
sub:
variant_sub(hello, hello)
exception Type mismatch.
code 80020005
mul:
variant_mul(hello, hello)
exception Type mismatch.
code 80020005
and:
variant_and(hello, hello)
exception Type mismatch.
code 80020005
div:
variant_div(hello, hello)
exception Type mismatch.
code 80020005
eqv:
variant_eqv(hello, hello)
exception Type mismatch.
code 80020005
idiv:
variant_idiv(hello, hello)
exception Type mismatch.
code 80020005
imp:
variant_imp(hello, hello)
exception Type mismatch.
code 80020005
mod:
variant_mod(hello, hello)
exception Type mismatch.
code 80020005
or:
variant_or(hello, hello)
exception Type mismatch.
code 80020005
pow:
variant_pow(hello, hello)
exception Type mismatch.
code 80020005
xor:
variant_xor(hello, hello)
exception Type mismatch.
code 80020005
--
add:
add:
variant_add(hello, )
exception Type mismatch.
code 80020005
cat: helloFalse
sub:
mul:
and:
div:
eqv:
idiv:
imp:
mod:
or:
pow:
xor:
sub:
variant_sub(hello, )
exception Type mismatch.
code 80020005
mul:
variant_mul(hello, )
exception Type mismatch.
code 80020005
and:
variant_and(hello, )
exception Type mismatch.
code 80020005
div:
variant_div(hello, )
exception Type mismatch.
code 80020005
eqv:
variant_eqv(hello, )
exception Type mismatch.
code 80020005
idiv:
variant_idiv(hello, )
exception Type mismatch.
code 80020005
imp:
variant_imp(hello, )
exception Type mismatch.
code 80020005
mod:
variant_mod(hello, )
exception Type mismatch.
code 80020005
or:
variant_or(hello, )
exception Type mismatch.
code 80020005
pow:
variant_pow(hello, )
exception Type mismatch.
code 80020005
xor:
variant_xor(hello, )
exception Type mismatch.
code 80020005
--
add: 42
cat: False42
@@ -231,30 +547,90 @@ or: 4
pow: 0
xor: 4
--
add:
add:
variant_add(0, hello)
exception Type mismatch.
code 80020005
cat: Falsehello
sub:
mul:
and:
div:
eqv:
idiv:
imp:
mod:
or:
pow:
xor:
sub:
variant_sub(0, hello)
exception Type mismatch.
code 80020005
mul:
variant_mul(0, hello)
exception Type mismatch.
code 80020005
and:
variant_and(0, hello)
exception Type mismatch.
code 80020005
div:
variant_div(0, hello)
exception Type mismatch.
code 80020005
eqv:
variant_eqv(0, hello)
exception Type mismatch.
code 80020005
idiv:
variant_idiv(0, hello)
exception Type mismatch.
code 80020005
imp:
variant_imp(0, hello)
exception Type mismatch.
code 80020005
mod:
variant_mod(0, hello)
exception Type mismatch.
code 80020005
or:
variant_or(0, hello)
exception Type mismatch.
code 80020005
pow:
variant_pow(0, hello)
exception Type mismatch.
code 80020005
xor:
variant_xor(0, hello)
exception Type mismatch.
code 80020005
--
add: 0
cat: FalseFalse
sub: 0
mul: 0
and: 0
div:
div:
variant_div(0, )
exception Out of present range.
code 8002000a
eqv: -1
idiv:
idiv:
variant_idiv(0, )
exception Division by zero.
code 80020012
imp: -1
mod:
mod:
variant_mod(0, )
exception Division by zero.
code 80020012
or: 0
pow: 1
xor: 0
+21 -7
View File
@@ -726,7 +726,7 @@ PHP_FUNCTION(cpdf_set_font)
int id, type;
CPDFdoc *pdf;
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(ht, 4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &arg1, &arg2, &arg3, &arg4) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2056,16 +2056,30 @@ PHP_FUNCTION(cpdf_place_inline_image)
}
count = 3 * im->sx * im->sy;
if(NULL == (buffer = (unsigned char *) emalloc(count)))
RETURN_FALSE;
buffer = (unsigned char *) safe_emalloc(3 * im->sx, im->sy, 0);
ptr = buffer;
for(i=0; i<im->sy; i++) {
for(j=0; j<im->sx; j++) {
color = im->pixels[i][j];
*ptr++ = im->red[color];
*ptr++ = im->green[color];
*ptr++ = im->blue[color];
#if HAVE_LIBGD20
if(gdImageTrueColor(im)) {
if (im->tpixels && gdImageBoundsSafe(im, j, i)) {
color = gdImageTrueColorPixel(im, j, i);
*ptr++ = (color >> 16) & 0xFF;
*ptr++ = (color >> 8) & 0xFF;
*ptr++ = color & 0xFF;
}
} else {
#endif
if (im->pixels && gdImageBoundsSafe(im, j, i)) {
color = im->pixels[i][j];
*ptr++ = im->red[color];
*ptr++ = im->green[color];
*ptr++ = im->blue[color];
}
#if HAVE_LIBGD20
}
#endif
}
}
+44
View File
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "../pear/package.dtd">
<package>
<name>cpdf</name>
<summary>Clib PDF functions</summary>
<maintainers>
<maintainer>
<user>steinm</user>
<name>Uwe Steinmann</name>
<email>steinm@php.net</email>
<role>lead</role>
</maintainer>
</maintainers>
<description>
ClibPDF lets you create PDF documents with PHP.
ClibPDF functionality and API are similar to PDFlib.
</description>
<license>PHP</license>
<release>
<state>beta</state>
<version>5.0rc1</version>
<date>2004-03-19</date>
<notes>
package.xml added to support intallation using pear installer
</notes>
<configureoptions>
<configureoption name="with-cpdf" default="autodetect" prompt="path to cpdf installation?"/>
</configureoptions>
<filelist>
<file role="doc" name="CREDITS"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.mw32"/>
<file role="src" name="cpdf.dsp"/>
<file role="src" name="cpdf.c"/>
<file role="src" name="php_cpdf.h"/>
</filelist>
<deps>
<dep type="php" rel="ge" version="5" />
</deps>
</release>
</package>
<!--
vim:et:ts=1:sw=1
-->
+7 -1
View File
@@ -97,7 +97,13 @@ PHP_MINFO_FUNCTION(ctype)
return; \
switch (Z_TYPE_P(c)) { \
case IS_LONG: \
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
} else if (Z_LVAL_P(c) >= -128) { \
RETURN_BOOL(iswhat(Z_LVAL_P(c) + 256)); \
} \
SEPARATE_ZVAL(&c); \
convert_to_string(c); \
case IS_STRING: \
{ \
char *p; \
+46
View File
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "../pear/package.dtd">
<package>
<name>ctype</name>
<summary>Character type detection</summary>
<maintainers>
<maintainer>
<user>hholzgra</user>
<name>Hartmut Holzgraefe</name>
<email>hartmut@php.net</email>
<role>lead</role>
</maintainer>
</maintainers>
<description>
The functions provided by this extension check whether a
character or string falls into a certain character class
according to the current locale.
</description>
<license>PHP</license>
<release>
<state>beta</state>
<version>5.0.0rc1</version>
<date>2004-03-19</date>
<notes>
package.xml added to support intallation using pear installer
</notes>
<filelist>
<file role="doc" name="CREDITS"/>
<file role="doc" name="README"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
<file role="src" name="ctype.dsp"/>
<file role="src" name="ctype.c"/>
<file role="src" name="php_ctype.h"/>
<file role="test" name="tests/001.phpt"/>
<file role="test" name="tests/002.phpt"/>
<file role="test" name="tests/bug25745.phpt"/>
</filelist>
<deps>
<dep type="php" rel="ge" version="5" />
</deps>
</release>
</package>
<!--
vim:et:ts=1:sw=1
-->
-2
View File
@@ -2,8 +2,6 @@
ctype on integers
--SKIPIF--
<?php if (!extension_loaded("ctype")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?php
setlocale(LC_ALL,"C");
-2
View File
@@ -2,8 +2,6 @@
ctype on strings
--SKIPIF--
<?php if (!extension_loaded("ctype")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?php
+34 -2
View File
@@ -39,6 +39,11 @@
#include <curl/curl.h>
#include <curl/easy.h>
/* As of curl 7.11.1 this is no longer defined inside curl.h */
#ifndef HttpPost
#define HttpPost curl_httppost
#endif
#define SMART_STR_PREALLOC 4096
#include "ext/standard/php_smart_str.h"
@@ -146,7 +151,9 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
REGISTER_CURL_CONSTANT(CURLOPT_PUT);
#if CURLOPT_MUTE != 0
REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
#endif
REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_RANGE);
@@ -316,6 +323,25 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
REGISTER_CURL_CONSTANT(CURLE_OBSOLETE);
REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE);
REGISTER_CURL_CONSTANT(CURLE_GOT_NOTHING);
REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_SETFAILED);
REGISTER_CURL_CONSTANT(CURLE_SEND_ERROR);
REGISTER_CURL_CONSTANT(CURLE_RECV_ERROR);
REGISTER_CURL_CONSTANT(CURLE_SHARE_IN_USE);
REGISTER_CURL_CONSTANT(CURLE_SSL_CERTPROBLEM);
REGISTER_CURL_CONSTANT(CURLE_SSL_CIPHER);
REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT);
REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
#ifdef CURLE_LDAP_INVALID_URL
REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL);
#endif
#ifdef CURLE_FILESIZE_EXCEEDED
REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED);
#endif
#ifdef CURLE_FTP_SSL_FAILED
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
#endif
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);
@@ -597,6 +623,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
}
/* }}} */
#if CURLOPT_PASSWDFUNCTION != 0
/* {{{ curl_passwd
*/
static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
@@ -639,6 +666,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
return ret;
}
/* }}} */
#endif
/* {{{ curl_free_string
*/
@@ -850,7 +878,9 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_NETRC:
case CURLOPT_FOLLOWLOCATION:
case CURLOPT_PUT:
case CURLOPT_MUTE:
#if CURLOPT_MUTE != 0
case CURLOPT_MUTE:
#endif
case CURLOPT_TIMEOUT:
case CURLOPT_FTP_USE_EPSV:
case CURLOPT_LOW_SPEED_LIMIT:
@@ -1005,6 +1035,7 @@ PHP_FUNCTION(curl_setopt)
ch->handlers->write_header->func_name = *zvalue;
ch->handlers->write_header->method = PHP_CURL_USER;
break;
#if CURLOPT_PASSWDFUNCTION != 0
case CURLOPT_PASSWDFUNCTION:
if (ch->handlers->passwd) {
zval_ptr_dtor(&ch->handlers->passwd);
@@ -1014,6 +1045,7 @@ PHP_FUNCTION(curl_setopt)
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd);
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch);
break;
#endif
case CURLOPT_POSTFIELDS:
if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) {
zval **current;
@@ -1052,7 +1084,7 @@ PHP_FUNCTION(curl_setopt)
error = curl_formadd(&first, &last,
CURLFORM_COPYNAME, string_key,
CURLFORM_NAMELENGTH, string_key_len - 1,
(ZVAL_REFCOUNT(*zvalue) > 1 ? CURLFORM_PTRCONTENTS : CURLFORM_COPYCONTENTS), postval,
CURLFORM_COPYCONTENTS, postval,
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
CURLFORM_END);
}
+52
View File
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "../pear/package.dtd">
<package>
<name>curl</name>
<summary>Clib PDF functions</summary>
<maintainers>
<maintainer>
<user>sterling</user>
<name>Sterling Hughes</name>
<email>sterling@php.net</email>
<role>lead</role>
</maintainer>
</maintainers>
<description>
PHP supports libcurl, a library created by Daniel Stenberg,
that allows you to connect and communicate to many different
types of servers with many different types of protocols.
libcurl currently supports the http, https, ftp, gopher,
telnet, dict, file, and ldap protocols. libcurl also supports
HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this
can also be done with PHP's ftp extension), HTTP form based
upload, proxies, cookies, and user+password authentication.
</description>
<license>PHP</license>
<release>
<state>beta</state>
<version>5.0rc1</version>
<date>2004-03-19</date>
<notes>
package.xml added to support intallation using pear installer
</notes>
<configureoptions>
<configureoption name="with-curl" default="autodetect" prompt="path to curl installation?"/>
</configureoptions>
<filelist>
<file role="doc" name="CREDITS"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.mw32"/>
<file role="src" name="curl.dsp"/>
<file role="src" name="interface.c"/>
<file role="src" name="multi.c"/>
<file role="src" name="streams.c"/>
<file role="src" name="php_curl.h"/>
</filelist>
<deps>
<dep type="php" rel="ge" version="5" />
</deps>
</release>
</package>
<!--
vim:et:ts=1:sw=1
-->
+4
View File
@@ -53,6 +53,10 @@ DBA_OPEN_FUNC(db2)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
s ? DB_BTREE : DB_UNKNOWN;
+6 -2
View File
@@ -62,9 +62,13 @@ DBA_OPEN_FUNC(db3)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
type = info->mode == DBA_READER ? DB_UNKNOWN :
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
s? DB_BTREE : DB_UNKNOWN;
s ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
(info->mode == DBA_CREAT && s) ? DB_CREATE :
+6 -2
View File
@@ -63,9 +63,13 @@ DBA_OPEN_FUNC(db4)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
type = info->mode == DBA_READER ? DB_UNKNOWN :
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
s? DB_BTREE : DB_UNKNOWN;
s ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
(info->mode == DBA_CREAT && s) ? DB_CREATE :
+57
View File
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "../pear/package.dtd">
<package>
<name>dbase</name>
<summary>dBase database file access functions</summary>
<maintainers>
<maintainer>
<user>jimw</user>
<name>Jim Winstead</name>
<email>jimw@php.net</email>
<role>lead</role>
</maintainer>
</maintainers>
<description>
These functions allow you to access records stored
in dBase-format (dbf) databases.
There is no support for indexes or memo fields.
There is no support for locking, too.
Two concurrent webserver processes modifying the
same dBase file will very likely ruin your database.
dBase files are simple sequential files of fixed length records.
Records are appended to the end of the file and delete records
are kept until you call dbase_pack().
</description>
<license>PHP</license>
<release>
<state>beta</state>
<version>5.0rc1</version>
<date>2004-03-19</date>
<notes>
package.xml added to support intallation using pear installer
</notes>
<filelist>
<file role="doc" name="CREDITS"/>
<file role="src" name="config.m4"/>
<file role="src" name="dbase.c"/>
<file role="src" name="dbf.h"/>
<file role="src" name="dbf_head.c"/>
<file role="src" name="dbf_head.h"/>
<file role="src" name="dbf_misc.c"/>
<file role="src" name="dbf_misc.h"/>
<file role="src" name="dbf_ndx.c"/>
<file role="src" name="dbf_ndx.h"/>
<file role="src" name="dbf_rec.c"/>
<file role="src" name="dbf_rec.h"/>
<file role="src" name="php_dbase.h"/>
</filelist>
<deps>
<dep type="php" rel="ge" version="5" />
</deps>
</release>
</package>
<!--
vim:et:ts=1:sw=1
-->
+23 -31
View File
@@ -40,7 +40,7 @@ int dbx_oci8_connect(zval **rv, zval **host, zval **db, zval **username, zval **
arguments[0]=username;
arguments[1]=password;
arguments[2]=db;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCILogon", &returned_zval, number_of_arguments, arguments);
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_connect", &returned_zval, number_of_arguments, arguments);
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_RESOURCE) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
return 0;
@@ -59,7 +59,7 @@ int dbx_oci8_pconnect(zval **rv, zval **host, zval **db, zval **username, zval *
arguments[0]=username;
arguments[1]=password;
arguments[2]=db;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCIPLogon", &returned_zval, number_of_arguments, arguments);
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_pconnect", &returned_zval, number_of_arguments, arguments);
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_RESOURCE) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
return 0;
@@ -71,14 +71,14 @@ int dbx_oci8_pconnect(zval **rv, zval **host, zval **db, zval **username, zval *
int dbx_oci8_close(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS)
{
/* returns 1 as long on success or 0 as long on failure */
/* actually, ocilogoff officially does nothing, so what should I return? */
/* actually, oci_close officially does nothing, so what should I return? */
/* I will just return NULL right now and change the test accordingly */
int number_of_arguments=1;
zval **arguments[1];
zval *returned_zval=NULL;
arguments[0]=dbx_handle;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCILogOff", &returned_zval, number_of_arguments, arguments);
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_close", &returned_zval, number_of_arguments, arguments);
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_BOOL) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
return 0;
@@ -98,16 +98,16 @@ int dbx_oci8_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_stat
arguments[0]=dbx_handle;
arguments[1]=sql_statement;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCIParse", &returned_zval, number_of_arguments, arguments);
/* OCIParse returns a bool for failure, or a statement_identifier for valid sql_statements */
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_parse", &returned_zval, number_of_arguments, arguments);
/* oci_parse returns a bool for failure, or a statement_identifier for valid sql_statements */
if (!returned_zval || (Z_TYPE_P(returned_zval)!=IS_BOOL && Z_TYPE_P(returned_zval)!=IS_RESOURCE)) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
return 0;
}
number_of_arguments=1;
arguments[0]=&returned_zval;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCIExecute", &execute_zval, number_of_arguments, arguments);
/* OCIExecute returns a bool for success or failure */
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_execute", &execute_zval, number_of_arguments, arguments);
/* oci_execute returns a bool for success or failure */
if (!execute_zval || Z_TYPE_P(execute_zval)!=IS_BOOL || Z_BVAL_P(execute_zval)==0) {
if (execute_zval) zval_ptr_dtor(&execute_zval);
zval_ptr_dtor(&returned_zval);
@@ -115,8 +115,8 @@ int dbx_oci8_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_stat
}
number_of_arguments=1;
arguments[0]=&returned_zval;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCIStatementType", &statementtype_zval, number_of_arguments, arguments);
/* OCIStatementType returns a string. 'SELECT' means there are results */
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_statement_type", &statementtype_zval, number_of_arguments, arguments);
/* oci_statement_type returns a string. 'SELECT' means there are results */
if (!statementtype_zval || Z_TYPE_P(statementtype_zval)!=IS_STRING) {
if (statementtype_zval) zval_ptr_dtor(&statementtype_zval);
if (execute_zval) zval_ptr_dtor(&execute_zval);
@@ -148,7 +148,7 @@ int dbx_oci8_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_P
zval *returned_zval=NULL;
arguments[0]=result_handle;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCINumCols", &returned_zval, number_of_arguments, arguments);
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_num_fields", &returned_zval, number_of_arguments, arguments);
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_LONG) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
return 0;
@@ -170,8 +170,8 @@ int dbx_oci8_getcolumnname(zval **rv, zval **result_handle, long column_index, I
ZVAL_LONG(zval_column_index, column_index+1);
arguments[0]=result_handle;
arguments[1]=&zval_column_index;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCIColumnName", &returned_zval, number_of_arguments, arguments);
/* OCIColumnName returns a string */
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_field_name", &returned_zval, number_of_arguments, arguments);
/* oci_field_name returns a string */
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_STRING) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
FREE_ZVAL(zval_column_index);
@@ -195,8 +195,8 @@ int dbx_oci8_getcolumntype(zval **rv, zval **result_handle, long column_index, I
ZVAL_LONG(zval_column_index, column_index+1);
arguments[0]=result_handle;
arguments[1]=&zval_column_index;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCIColumnType", &returned_zval, number_of_arguments, arguments);
/* OCIColumnType returns a string??? */
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_field_type", &returned_zval, number_of_arguments, arguments);
/* oci_field_type returns a string??? */
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_STRING) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
FREE_ZVAL(zval_column_index);
@@ -211,31 +211,23 @@ int dbx_oci8_getcolumntype(zval **rv, zval **result_handle, long column_index, I
int dbx_oci8_getrow(zval **rv, zval **result_handle, long row_number, INTERNAL_FUNCTION_PARAMETERS)
{
/* returns array[0..columncount-1] as strings on success or 0 as long on failure */
int number_of_arguments=3;
zval **arguments[3];
int number_of_arguments=2;
zval **arguments[2];
zval *zval_resulttype=NULL;
zval *zval_returned_array=NULL;
zval *returned_zval=NULL;
MAKE_STD_ZVAL(zval_returned_array); /* no value needed, it will be overwritten anyway */
ZVAL_EMPTY_STRING(zval_returned_array); /* there seems to be some weird mem-bug, so assigning a value anyway */
MAKE_STD_ZVAL(zval_resulttype);
ZVAL_LONG(zval_resulttype, OCI_NUM | OCI_RETURN_NULLS | OCI_RETURN_LOBS); /* no ASSOC, dbx handles that part */
arguments[0]=result_handle;
arguments[1]=&zval_returned_array;
arguments[2]=&zval_resulttype;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCIFetchInto", &returned_zval, number_of_arguments, arguments);
/* OCIFetchInto returns the number of columns as an integer on success and FALSE */
/* on failure. The actual array is passed back in arg[1] */
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_LONG || Z_LVAL_P(returned_zval)==0) {
arguments[1]=&zval_resulttype;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_fetch_array", &returned_zval, number_of_arguments, arguments);
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_ARRAY) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
FREE_ZVAL(zval_resulttype);
FREE_ZVAL(zval_returned_array);
return 0;
}
FREE_ZVAL(zval_resulttype);
zval_ptr_dtor(&returned_zval);
MOVE_RETURNED_TO_RV(rv, zval_returned_array);
MOVE_RETURNED_TO_RV(rv, returned_zval);
return 1;
}
@@ -251,8 +243,8 @@ int dbx_oci8_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS)
zval *returned_message_zval=NULL;
arguments[0]=dbx_handle;
if (!dbx_handle) number_of_arguments=0;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCIError", &returned_zval, number_of_arguments, arguments);
/* OCIError should returns an assoc array containing code & message, dbx needs the message */
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "oci_error", &returned_zval, number_of_arguments, arguments);
/* oci_error should returns an assoc array containing code & message, dbx needs the message */
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_ARRAY) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
return 0;
+5 -5
View File
@@ -148,7 +148,7 @@ int dbx_pgsql_query(zval **rv, zval **dbx_handle, zval **db_name, zval **sql_sta
/* db_name is not used in this function */
args[0]=dbx_handle;
args[1]=sql_statement;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_exec", &returned_zval, nargs, args);
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_query", &returned_zval, nargs, args);
/* pg_query returns a bool for success or failure,
or a result_identifier for select statements */
if (!returned_zval || (Z_TYPE_P(returned_zval)!=IS_BOOL && Z_TYPE_P(returned_zval)!=IS_RESOURCE)) {
@@ -167,7 +167,7 @@ int dbx_pgsql_getcolumncount(zval **rv, zval **result_handle, INTERNAL_FUNCTION_
zval *returned_zval=NULL;
arguments[0]=result_handle;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_numfields", &returned_zval, number_of_arguments, arguments);
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_num_fields", &returned_zval, number_of_arguments, arguments);
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_LONG) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
return 0;
@@ -188,7 +188,7 @@ int dbx_pgsql_getcolumnname(zval **rv, zval **result_handle, long column_index,
ZVAL_LONG(zval_column_index, column_index);
arguments[0]=result_handle;
arguments[1]=&zval_column_index;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_fieldname", &returned_zval, number_of_arguments, arguments);
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_field_name", &returned_zval, number_of_arguments, arguments);
/* pg_fieldname returns a string */
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_STRING) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
@@ -212,7 +212,7 @@ int dbx_pgsql_getcolumntype(zval **rv, zval **result_handle, long column_index,
ZVAL_LONG(zval_column_index, column_index);
arguments[0]=result_handle;
arguments[1]=&zval_column_index;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_fieldtype", &returned_zval, number_of_arguments, arguments);
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_field_type", &returned_zval, number_of_arguments, arguments);
/* pg_fieldtype returns a string */
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_STRING) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
@@ -252,7 +252,7 @@ int dbx_pgsql_error(zval **rv, zval **dbx_handle, INTERNAL_FUNCTION_PARAMETERS)
arguments[0]=dbx_handle;
if (!dbx_handle) number_of_arguments=0;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_errormessage", &returned_zval, number_of_arguments, arguments);
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_last_error", &returned_zval, number_of_arguments, arguments);
if (!returned_zval || Z_TYPE_P(returned_zval)!=IS_STRING) {
if (returned_zval) zval_ptr_dtor(&returned_zval);
return 0;
+89
View File
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE package SYSTEM "../pear/package.dtd">
<package>
<name>dbx</name>
<summary>Database abstraction functions</summary>
<maintainers>
<maintainer>
<user>mboeren</user>
<name>Marc Boeren</name>
<email>marc@guidance.nl</email>
<role>lead</role>
</maintainer>
<maintainer>
<user>hirokawa</user>
<name>Rui Hirokawa</name>
<email>hirokawa@php.net</email>
<role>lead</role>
</maintainer>
<maintainer>
<user>???</user>
<name>Frank M. Kromann</name>
<email>frank@kromann.info</email>
<role>lead</role>
</maintainer>
</maintainers>
<description>
The dbx module is a database abstraction layer (db 'X', where 'X'
is a supported database). The dbx functions allow you to access all
supported databases using a single calling convention. The
dbx-functions themselves do not interface directly to the databases,
but interface to the modules that are used to support these databases.
</description>
<license>PHP</license>
<release>
<state>beta</state>
<version>5.0.0rc1</version>
<date>2004-03-19</date>
<notes>
package.xml added to support intallation using pear installer
</notes>
<filelist>
<file role="doc" name="CREDITS"/>
<file role="doc" name="INSTALL"/>
<file role="doc" name="howto_extend_dbx.html"/>
<file role="src" name="config.m4"/>
<file role="src" name="config.w32"/>
<file role="src" name="dbx.dsp"/>
<file role="src" name="dbx.c"/>
<file role="src" name="dbx.h"/>
<file role="src" name="dbx_fbsql.c"/>
<file role="src" name="dbx_fbsql.h"/>
<file role="src" name="dbx_mssql.c"/>
<file role="src" name="dbx_mssql.h"/>
<file role="src" name="dbx_mysql.c"/>
<file role="src" name="dbx_mysql.h"/>
<file role="src" name="dbx_oci8.c"/>
<file role="src" name="dbx_oci8.h"/>
<file role="src" name="dbx_odbc.c"/>
<file role="src" name="dbx_odbc.h"/>
<file role="src" name="dbx_pgsql.c"/>
<file role="src" name="dbx_pgsql.h"/>
<file role="src" name="dbx_sybasect.c"/>
<file role="src" name="dbx_sybasect.h"/>
<file role="src" name="php_dbx.h"/>
<file role="src" name="dbx_sqlite.c"/>
<file role="src" name="dbx_sqlite.h"/>
<file role="test" name="tests/001.phpt"/>
<file role="test" name="tests/002.phpt"/>
<file role="test" name="tests/003.phpt"/>
<file role="test" name="tests/004.phpt"/>
<file role="test" name="tests/005.phpt"/>
<file role="test" name="tests/006.phpt"/>
<file role="test" name="tests/007.phpt"/>
<file role="test" name="tests/008.phpt"/>
<file role="test" name="tests/009.phpt"/>
<file role="test" name="tests/dbx_test.p"/>
<file role="test" name="tests/dbx_test.pgsql.script"/>
<file role="test" name="tests/dbx_test.script"/>
<file role="test" name="tests/skipif.inc"/>
<file role="test" name="tests/010.phpt"/>
</filelist>
<deps>
<dep type="php" rel="ge" version="5" />
</deps>
</release>
</package>
<!--
vim:et:ts=1:sw=1
-->
Loaded 100 of 985 files, more files were not shown because too many files have changed in this diff. Show more