Commit Graph

5222 Commits

Author SHA1 Message Date
Antony Dovgal
49a2ae60d0 fix leaks in get_meta_tags() when used with b0rked HTML
add test
2006-11-13 20:17:05 +00:00
Ilia Alshanetsky
a65efab679 MFB: php_splice() optimization 2006-11-13 15:34:49 +00:00
Hannes Magnusson
6d22129d9b Fixed bug#36975 (natcasesort() causes array_pop() to misbehave) 2006-11-12 01:11:58 +00:00
Andrei Zmievski
2d40fd328d Allow mixing Unicode/binary string types. 2006-11-10 12:01:50 +00:00
Dmitry Stogov
768185e58f Implemented registry cache that prevent registry lookup on each request. In case of modification of corresponding registry-tree PHP will reload it automatic. 2006-11-10 11:42:40 +00:00
Dmitry Stogov
afe251ab8d Faster and better licensed implementation 2006-11-10 10:11:05 +00:00
Dmitry Stogov
dc34d34230 Simplify the code base as this getpwd() was used only once 2006-11-10 09:56:37 +00:00
Ilia Alshanetsky
26fb0b51b5 MFB: Added missing PHPAPI declaration 2006-11-09 20:02:08 +00:00
Dmitry Stogov
edad4f460c Fixed tests 2006-11-09 08:29:37 +00:00
Antony Dovgal
3fb2cb298b fix more tests 2006-11-09 01:16:48 +00:00
Antony Dovgal
a6132def32 fix test 2006-11-09 01:07:31 +00:00
Antony Dovgal
8c5c0ce29c fix test and prevent endless loop 2006-11-09 00:33:54 +00:00
Ilia Alshanetsky
7ebb315ea9 MFB: fixed tests 2006-11-07 20:26:35 +00:00
Andrei Zmievski
dc5f913920 Unicode support in entities/special chars funcs. See the NOTE at the
top.
2006-11-06 21:45:49 +00:00
Dmitry Stogov
a5e8f02f0e Windows doesn't have chown(). Remove unused function and reference to undeclared macro VCWD_CHOWN(). 2006-11-06 14:55:14 +00:00
Rasmus Lerdorf
4ee758a8e0 data: and php:stdin/input allow_url_include checks 2006-11-05 20:44:52 +00:00
Hannes Magnusson
5e9c0be4f8 Remove SKIPIF 2006-11-03 14:17:17 +00:00
Ilia Alshanetsky
ec83b46bf9 MFB: Fixed bug #39215 (Inappropriate close of stdin/stdout/stderr). 2006-11-03 13:34:39 +00:00
Ilia Alshanetsky
3482d76823 MFB: Added missing boundary checks. 2006-11-01 01:56:21 +00:00
Andrei Zmievski
28e7df42db convert_cyr_string() should operate only on binary strings. 2006-10-27 18:14:19 +00:00
Andrei Zmievski
01ac3f00f8 Unicode support for link functions. 2006-10-26 20:25:45 +00:00
Andrei Zmievski
8f54e61aa5 Oops. 2006-10-26 17:59:53 +00:00
Andrei Zmievski
7b553531af Make url encoding/decoding functions use binary strings only. 2006-10-26 17:33:33 +00:00
Andrei Zmievski
d93ef8d37a Mark syslog functions with U. No upgrading is necessary -- we'll just
use runtime encoding to convert strings.
2006-10-26 17:12:00 +00:00
Andrei Zmievski
30f624003d *** empty log message *** 2006-10-25 20:30:51 +00:00
Andrei Zmievski
66c5317278 Unicode support for get(server|proto)by(name|number) family of funcs. 2006-10-25 20:09:21 +00:00
Andrei Zmievski
205bade673 Unicode support for is_uploaded_file()/move_uploaded_file(). 2006-10-25 18:03:45 +00:00
Andrei Zmievski
bee52acb7d Unicode support for fnmatch(). 2006-10-25 17:28:20 +00:00
Andrei Zmievski
dbda777b0b getrusage.c was easy(). But don't ever use zend_parse_parameters() like
that.
2006-10-19 22:14:04 +00:00
Andrei Zmievski
9c83ae0549 Unicode support in microtime() and gettimeofday(). 2006-10-19 22:11:04 +00:00
Andrei Zmievski
af2c117d29 Pick some low-hanging fruit. 2006-10-19 20:55:08 +00:00
Andrei Zmievski
9daff2a92b Unicode support for remaining image.c functions. 2006-10-19 18:20:13 +00:00
Andrei Zmievski
73b75cf052 Unicode support for headers_sent(). 2006-10-19 17:55:33 +00:00
Antony Dovgal
7bf64871c9 add new test by Pierre 2006-10-19 12:06:57 +00:00
Johannes Schlüter
0e58baae93 - Fix #38465 (ReflectionParameter fails if default value is an access to self:: 2006-10-18 16:34:25 +00:00
Antony Dovgal
8390d4f94f initialize optional variables 2006-10-16 19:27:00 +00:00
Hannes Magnusson
9116acf89f Fix test 2006-10-15 13:44:41 +00:00
Hannes Magnusson
851a7c6157 MFB: missing API declaration 2006-10-13 09:55:48 +00:00
Ilia Alshanetsky
f3eee9d980 MFB: Fixed bug #38934 (move_uploaded_file() cannot read uploaded file
outside of open_basedir).
2006-10-13 01:44:42 +00:00
Michael Wallner
4aa7a28e5a - missing part of zend_fcall_info API patch 2006-10-12 12:40:26 +00:00
Sara Golemon
cc51b47859 Bugfix#38649 Optional param not initialized 2006-10-11 23:20:54 +00:00
Antony Dovgal
7154dd7b87 add test 2006-10-11 14:57:38 +00:00
Antony Dovgal
4a8aaa1e4d check filter and class names for empty strings 2006-10-11 14:46:31 +00:00
Ilia Alshanetsky
2fa1fb9db3 MFB: Catch empty strings right away. 2006-10-11 14:30:50 +00:00
Antony Dovgal
721ade4f41 fix test on 64bit 2006-10-11 13:18:18 +00:00
Antony Dovgal
527cc7bd37 avoid reading str[-1], add warning when invalid format specified
add test
2006-10-11 13:14:08 +00:00
Antony Dovgal
729ed6eafc fix crash when parsing invalid hostnames/IPs 2006-10-11 12:53:38 +00:00
Andrei Zmievski
0a73c305d8 Typos! 2006-10-09 20:17:36 +00:00
Andrei Zmievski
76eb73a4b7 print_r(), error_log() and sys_getloadavg() are Unicode-safe. 2006-10-09 20:17:12 +00:00
Andrei Zmievski
cc0323b95d Unicode support for call_user_* functions. 2006-10-09 19:48:32 +00:00
Ilia Alshanetsky
e8ccee4873 MFB: Fixed bug #37262 (var_export() does not escape \0 character). 2006-10-09 18:09:42 +00:00
Sara Golemon
9b4bc8d489 Oi 2006-10-09 02:55:38 +00:00
Sara Golemon
25af62e3f4 Fix realpath() in unicode mode 2006-10-09 02:52:27 +00:00
Sara Golemon
1caed2fa18 Add stream_resolve_include_path() 2006-10-09 02:48:06 +00:00
Hannes Magnusson
6d5c5bce5a Fix test 2006-10-08 20:06:04 +00:00
Sara Golemon
3a40f32c6e Fix win32 (again), just temporarily convert the classname to ascii on this platform... 2006-10-08 18:00:44 +00:00
Hannes Magnusson
176b72284c Error message clean up
(patch by Matt W (php_lists -AT- realpain.com))
2006-10-08 13:34:24 +00:00
Hannes Magnusson
e531458f89 Remove double "wrong param count" warnings 2006-10-07 22:55:18 +00:00
Sara Golemon
62f01f5e6c Win32 build gets confused by expansion of U_STRING_DECL macro with constants 2006-10-07 04:45:42 +00:00
Andrei Zmievski
562e88a30f Default to ZEND_STR_TYPE. 2006-10-07 00:41:14 +00:00
Andrei Zmievski
92886ccdec Unicode support in is_callable(). 2006-10-06 20:11:25 +00:00
Andrei Zmievski
73ea9b8be5 Unicode support in uniqid(). 2006-10-06 20:00:37 +00:00
Andrei Zmievski
d019da8692 Mark memory funcs with U. 2006-10-06 18:03:41 +00:00
Andrei Zmievski
c25a48dcb3 Mark with U. 2006-10-06 18:02:04 +00:00
Andrei Zmievski
54174862f0 Mark pageinfo.c funcs with U. 2006-10-06 18:01:20 +00:00
Andrei Zmievski
5064851c9d Mark rand.c functions with U. 2006-10-06 18:00:13 +00:00
Sara Golemon
17cdda770d Forgot to mark these u-safe 2006-10-06 17:41:30 +00:00
Andrei Zmievski
0ba9147d9b TODO 2006-10-05 22:44:31 +00:00
Andrei Zmievski
0decd2d4e7 Unicode support for str_replace() and str_ireplace().
# This was not trivial.
2006-10-05 22:40:38 +00:00
Antony Dovgal
373098b296 add test 2006-10-05 19:49:20 +00:00
Ilia Alshanetsky
4492d8f089 MFB: Fixed missing open_basedir check inside chdir() function. 2006-10-04 23:20:54 +00:00
Andrei Zmievski
f630127685 - Mark stristr() with U.
- zpp support for ucwords()
2006-10-04 17:38:09 +00:00
Andrei Zmievski
4b3a597d29 Unicode support in substr_compare(). 2006-10-04 17:25:12 +00:00
Edin Kadribasic
328dc8d62d Update credits 2006-10-04 12:53:03 +00:00
Antony Dovgal
88e893b50a fix #39032 (strcspn() stops on null character) 2006-10-04 11:12:21 +00:00
Antony Dovgal
8d85069827 return false on invalid mode and don't segfault 2006-10-04 10:52:32 +00:00
Antony Dovgal
a99e3ec1b3 remove TSRMLS_CC, php_stream_path_decode() is a macro 2006-10-03 23:26:14 +00:00
Antony Dovgal
1bdcfa172a use correct type for p_len 2006-10-03 23:09:08 +00:00
Sara Golemon
6fbd520e93 PHP6 updates for convert_uu(en|de)code() 2006-10-03 19:51:35 +00:00
Sara Golemon
934c3781b2 Update proc_open() for PHP6 2006-10-03 19:37:01 +00:00
Antony Dovgal
ea11c9b8e8 nuke unused variables 2006-10-03 18:40:14 +00:00
Antony Dovgal
efe92dc230 fix build 2006-10-03 18:38:57 +00:00
Andrei Zmievski
481e9fd525 Unicode support in strripos(). 2006-10-03 18:13:36 +00:00
Ilia Alshanetsky
25ac82bbb6 MFB: optimize zend_hash_init() with known hash table sizes. 2006-10-03 17:45:16 +00:00
Hannes Magnusson
0eaea000db compact() doesnt throw "wrong param count" 2006-10-03 16:36:57 +00:00
Antony Dovgal
7dd21d2b9f fix ZTS build 2006-10-03 13:44:14 +00:00
Sara Golemon
260836ec7a Flag the easy stuff out of the way, proc_open() is the real beast in here 2006-10-02 21:02:08 +00:00
Andrei Zmievski
0b34032e49 - Fix strrpos() logic (which was broken even in PHP 5).
- Optimizations for a couple of functions.
2006-10-02 19:18:14 +00:00
Sara Golemon
d2aebce18f Update glob() for PHP6 2006-10-02 18:14:42 +00:00
Sara Golemon
2dccf612fc Switch opendir/chroot/chdir to new path_param API and upgrade scandir() for PHP6 2006-10-02 17:45:30 +00:00
Andrei Zmievski
e673ae2eb9 Make stripos() work with Unicode strings. 2006-10-02 16:52:22 +00:00
Hannes Magnusson
9c669ecf1f Protos 2006-10-02 07:54:37 +00:00
Sara Golemon
a4b9e3719b Apply new path encoding style to the rest of e/s/file.c
This layout is definately simpler to maintain
and every bit as functional as the other version.
2006-10-02 03:13:47 +00:00
Sara Golemon
d2ff6db191 Apply simplified path encoding to copy() and give it a context param.
Funnily enough, this makes the copy() implementation almost identical
to what it was back in PHP5.
2006-10-02 02:47:34 +00:00
Sara Golemon
e321287b4f Try out simplified API for encoding paths/filenames 2006-10-02 02:24:29 +00:00
Sara Golemon
7f21f36e45 ZTS fix 2006-10-02 01:11:04 +00:00
Sara Golemon
a6a92fc458 Allow unicode-ascii to binary conversion and do proper path conversion for file variants 2006-10-02 00:32:13 +00:00
Ilia Alshanetsky
30885c8d99 MFB: Fixed bug #38993 (Fixed safe_mode/open_basedir checks for
session.save_path, allowing them to account for extra parameters).
2006-10-01 21:00:00 +00:00
Ilia Alshanetsky
cda99a3563 MFB: Added missing API function declaration. 2006-09-29 22:36:00 +00:00
Ilia Alshanetsky
6dd4ae4c4a MFB: Added missing declaration of the php_get_uname() PHPAPI function. 2006-09-29 21:40:35 +00:00
Andrei Zmievski
2db5bfbadd Heck, might as well commit this.. 2006-09-29 21:00:07 +00:00
Hannes Magnusson
2288a69be1 fix proto 2006-09-29 13:22:43 +00:00
Antony Dovgal
f17a799f86 fix test name 2006-09-28 22:01:46 +00:00
Ilia Alshanetsky
7d3e03b2a7 MFB: Fixed bug #38859 (parse_url() fails if passing '@' in passwd). 2006-09-28 14:52:55 +00:00
Antony Dovgal
a005d97eeb fix #38981 (using FTP URLs in get_headers() causes crash) 2006-09-28 12:55:02 +00:00
Antony Dovgal
d0a747e937 fix #38961 (metaphone() results in segmentation fault on NetBSD) 2006-09-27 08:31:35 +00:00
Ilia Alshanetsky
ea18d7ed7b MFB: 64bit fix (Possible fix for bug #38961) 2006-09-26 15:40:59 +00:00
Ilia Alshanetsky
0f9b85cc82 MFB: Fixed bug #38891 (get_headers() do not work with curl-wrappers). 2006-09-25 16:02:19 +00:00
Dmitry Stogov
c64e0f0e21 ZTS fix 2006-09-25 06:59:02 +00:00
Sara Golemon
423af2f426 PHP6 Updates and some very minor feature add in dns_get_record() 2006-09-25 02:27:24 +00:00
Sara Golemon
406f600d01 Make settype($var, 'string'); behave like $var = (string)$var;
e.g. switch between (binary) and (unicode) depending on UG(unicode)
2006-09-25 01:37:55 +00:00
Sara Golemon
b8f5020a92 Flag a couple more unicode ready functions 2006-09-25 01:33:57 +00:00
Sara Golemon
e6ba834b50 base64 functions are basicly binary-only ops 2006-09-25 01:27:11 +00:00
Sara Golemon
37bf98099f PHP6 Update: fsockopen/psfockopen 2006-09-24 21:43:41 +00:00
Sara Golemon
e1c934d56c PHP6 Updates for rmdir/mkdir/rename 2006-09-24 21:40:44 +00:00
Sara Golemon
f8fdb67056 PHP6 Updates for popen() and related functionality 2006-09-24 20:33:14 +00:00
Sara Golemon
74e30fd41d PHP6 Update for get_meta_tags() -- What a silly function... 2006-09-24 20:01:29 +00:00
Sara Golemon
7b082203e5 PHP6 Updates 2006-09-24 18:23:47 +00:00
Sara Golemon
a515fde08a PHP6 Updates w/ minor refactoring 2006-09-24 17:59:40 +00:00
Sara Golemon
1f8bbc65a6 PHP6 Updates 2006-09-24 17:09:46 +00:00
Sara Golemon
1a13bdc516 PHP6 Updates 2006-09-24 17:03:58 +00:00
Antony Dovgal
b6f2e80f03 add missing parameter to opendir() and fix segfault 2006-09-23 12:32:32 +00:00
Antony Dovgal
cad50f1dd2 one more try to fix ZTS build 2006-09-23 12:22:07 +00:00
Antony Dovgal
e02e25dca2 fix ZTS build 2006-09-23 12:17:43 +00:00
Antony Dovgal
b202bcda65 fix possible segfault in #38891 2006-09-23 11:58:49 +00:00
Sara Golemon
7b0305b311 PHP6 Updates 2006-09-22 23:57:38 +00:00
Sara Golemon
6dffc7bf14 Fix copy() from last commit and add a few more PHP6 updates 2006-09-22 21:48:33 +00:00
Sara Golemon
6905daca8e Update copy() for PHP6 2006-09-22 20:02:26 +00:00
Sara Golemon
3191ed0e85 Update stream_copy_to_stream() for PHP6 2006-09-22 19:54:30 +00:00
Andrei Zmievski
ca83e9b7a7 Unicode upgrade for quotemeta(). Yes, I know it's ugly. You try making
it pretty.
2006-09-22 19:35:05 +00:00
Sara Golemon
96f9c9c59c Update stream_get_contents() for PHP6 2006-09-22 18:42:33 +00:00
Andrei Zmievski
cd58faa031 Bring localeconv(), money_format(), and nl_langinfo() to standards. Add
E_STRICT notices about them being deprecated in Unicode mode.
2006-09-22 18:24:12 +00:00
Sara Golemon
29ccb96d9e Tweak file_get_contents()'s return value a little 2006-09-22 18:23:33 +00:00
Andrei Zmievski
50fe3da0af Unicode support in count_chars(). Note that due to the size of the
Unicode character set only mode=1 is supported.
2006-09-22 17:47:09 +00:00
Sara Golemon
a9404e9283 PHP6 Updates 2006-09-22 01:55:47 +00:00
Sara Golemon
b087b2ff62 PHP6 Updates 2006-09-21 23:36:13 +00:00
Sara Golemon
1aa537ebd4 Update (most of) the functions in streamsfuncs.c
This commit also includes a change to tests/file/stream_rfc2397_002.phpt
which doesn't entirely pass in unicode mode yet, however that's a unicode
issue in the data:// wrapper that needs fixing, not a problem with the
streams layer itself.
2006-09-21 19:53:10 +00:00
Andrei Zmievski
7ff8b9b090 Bug fixes for substr_replace(). 2006-09-20 20:30:19 +00:00
Ilia Alshanetsky
c1891a9bdf MFB: array_key_exists() should not work by by-ref 2006-09-19 23:45:12 +00:00
Sara Golemon
3f56da6eba Add INI controlled default stream encoding (unicode.stream_encoding).
Add convenience function stream_defualt_encoding() for setting it.
2006-09-19 20:36:48 +00:00
Dmitry Stogov
128548a5c0 Disabled autoconversion of hash keys (from string to unicode) for PHP arrays 2006-09-19 10:38:31 +00:00
Antony Dovgal
591477b143 support objects in array_walk*()
add new tests, fix old ones
2006-09-19 09:33:02 +00:00
Antony Dovgal
cb7a7995b6 fix #34066 (recursive array_walk causes segfault)
add tests
2006-09-19 09:02:39 +00:00
Ilia Alshanetsky
9d48f6fb61 MFB: Additional expand_filepath() checks 2006-09-16 18:31:07 +00:00
Antony Dovgal
c912fa4a90 fix leak when call to shutdown function fails 2006-09-15 09:11:31 +00:00
Antony Dovgal
e264e460a4 fix double free(), add test 2006-09-15 07:26:19 +00:00
Dmitry Stogov
e8f1640adb Write valid run-time value for Zend Memory Manager 2006-09-14 08:56:11 +00:00
Ilia Alshanetsky
675bda66b6 MFB: Fixed bug #38096 (large timeout values ignored on 32bit machines in
stream_socket_accept() and stream_socket_client()).
2006-09-11 14:53:33 +00:00
Antony Dovgal
ffe419fefc add new tests, increase code coverage 2006-09-07 11:47:57 +00:00
Ilia Alshanetsky
803b3f4d77 MFB: Fixed bug #38464 (array_count_values() mishandles numeric strings). 2006-09-06 17:31:47 +00:00
Nuno Lopes
e09ffb06f1 MFB: fix gcc warning 2006-09-04 19:16:21 +00:00
Pierre Joye
08b433783c - updates 2006-08-31 22:52:29 +00:00
Antony Dovgal
d08f2e8897 more z/Z fixes 2006-08-31 14:41:15 +00:00
Antony Dovgal
1e284298d7 more z/Z fixes 2006-08-31 14:19:33 +00:00
Antony Dovgal
f53f3b01dd fix ZTS build 2006-08-30 20:24:32 +00:00
Ilia Alshanetsky
922fd02404 Avoid TSRMLS_FETCH 2006-08-30 18:40:26 +00:00
Antony Dovgal
a08e79e900 fix leak in iptcembed() 2006-08-30 16:30:03 +00:00
Antony Dovgal
8149e6251e make sure ext/standard is down before ext/session (fixes #38534) 2006-08-28 19:56:06 +00:00
Antony Dovgal
8d28cf264a fix tests 2006-08-28 19:52:01 +00:00
Antony Dovgal
efb89cfbe1 set BG(locale_string) to NULL on shutdown (partly fixes #38534) 2006-08-28 18:58:22 +00:00
Hannes Magnusson
089b2ab93f Register missing math constants (been missing since 4.0.2!)
Remove M_PI from math.c (its defined in php_math.h)
2006-08-27 18:20:39 +00:00
Hannes Magnusson
ea2891fa9d Fix tests on freebsd 2006-08-27 15:06:15 +00:00
Antony Dovgal
1fbee1aee3 tm_yday may be 0 (Solaris) 2006-08-24 11:27:06 +00:00
Antony Dovgal
8bb1361f23 this fixes segfault in strptime() on 64bit Linuxes, caused by the missing declaration
unfortunately defining _XOPEN_SOURCE breaks the build (some odd dependencies in glibc headers) and this seems to be the best solution
2006-08-24 11:05:38 +00:00
Antony Dovgal
2fdd51a1a0 add test 2006-08-22 19:51:34 +00:00
Dmitry Stogov
9ea1f365d9 ZTS fix 2006-08-22 04:54:00 +00:00
Ilia Alshanetsky
285e5f69d6 MFB: Fixed bug #38524 (strptime() does not initialize the internal date
storage structure).
2006-08-20 18:20:59 +00:00
Andrei Zmievski
9f8bcf3f51 Unicode support for str_word_count() (using the same semantics as for
binary strings).

# These semantics seem quite broken, by the way, as it counts words
# ending or starting with dashes (-). Since this shouldn't really be
# used to count words in Unicode world anyway, supporting the "broken"
# behavior is okay if it helps people with migration.
2006-08-18 18:01:58 +00:00
Antony Dovgal
84060835f7 add a notice to fgetcsv() when delimiter or enclosure is longer than 1 char
(feature request #38496)
2006-08-18 12:50:36 +00:00
Andrei Zmievski
253a82d0cc Simplify php_u_trim(). 2006-08-16 18:07:22 +00:00
Sebastian Bergmann
8551b6d2dc Sync with php_trim() API change. 2006-08-16 08:51:34 +00:00
Andrei Zmievski
2dcfe8aaf5 Fix some trim() issues. 2006-08-15 20:38:12 +00:00
Antony Dovgal
3431cc4a1f don't try to use "auto", "none" and "pass" charsets returned from mbstring 2006-08-15 15:09:21 +00:00
Antony Dovgal
c1b3a17034 new tests 2006-08-15 08:53:55 +00:00
Andrei Zmievski
bd927905ee Unicode support for strcoll(). 2006-08-14 22:00:46 +00:00
Andrei Zmievski
aa9de18ef5 Unicode support for str_split(). 2006-08-14 21:04:50 +00:00
Andrei Zmievski
01e677b37b Unicode support in chunk_split(). 2006-08-14 20:43:23 +00:00
Edin Kadribasic
56a821ec02 Fixed windows build.
Looking at the macro definition it seems that the second argument
to U_STRING_DECL can only be a string literal, not an indetifier.
2006-08-14 11:59:07 +00:00
Ilia Alshanetsky
fa48ce6810 MFB: Various security fixes 2006-08-10 19:02:32 +00:00
Ilia Alshanetsky
b97c393f87 MFB: Added support for httpOnly flag for session extension and cookie
setting functions.
2006-08-10 13:56:54 +00:00
Antony Dovgal
3cf1565d90 typos in comments and other minor improvements 2006-08-10 13:44:00 +00:00
Antony Dovgal
8a159b3efc initialize variable 2006-08-10 09:31:24 +00:00
Antony Dovgal
6ca1ce9986 fix test 2006-08-09 20:34:00 +00:00
Antony Dovgal
704dc9be61 fix ZTS build 2006-08-09 20:31:06 +00:00
Andrei Zmievski
8d953e611d Unicode support for str_shuffle(). 2006-08-09 20:19:06 +00:00
Andrei Zmievski
7201041bc0 Upgrade str_rot13() to work with IS_UNICODE type. 2006-08-09 20:03:22 +00:00
Frank M. Kromann
4fef78869b Fix ZTS builds 2006-08-09 18:15:06 +00:00
Andrei Zmievski
533196671f addcslashes() and stripcslashes() should work only on binary strings. 2006-08-09 17:40:21 +00:00
Antony Dovgal
fddbbb0831 fix test 2006-08-08 22:05:20 +00:00
Antony Dovgal
2168051985 initialize vars 2006-08-08 22:01:48 +00:00
Antony Dovgal
f56a71c63c fix tests to be able to run just .phpt's 2006-08-08 22:01:24 +00:00
Andrei Zmievski
1b18b5a68f Convert nl2br() to suppor IS_UNICODE.
# Hmm, it's a bit ugly..
2006-08-08 21:03:11 +00:00
Antony Dovgal
6b2273b905 fix tests 2006-08-08 20:24:13 +00:00
Antony Dovgal
9c125e6911 fix tests 2006-08-08 20:17:31 +00:00
Antony Dovgal
664ed4959e fix test 2006-08-08 20:13:27 +00:00
Antony Dovgal
d350e4b038 fix logic and memleak 2006-08-08 18:06:43 +00:00
Antony Dovgal
94912e5e02 fix leak in assert() 2006-08-08 17:32:19 +00:00
Antony Dovgal
dbe2092313 implement zend_unicode_to_string() and zend_string_to_unicode()
part #2 (of 2)
2006-08-08 16:59:11 +00:00
Antony Dovgal
af688c3394 add new test 2006-08-08 09:50:54 +00:00
Antony Dovgal
9cc9f2da3e use memrchr/zend_memrchr instead of strrchr
fix wrong test
2006-08-08 09:48:08 +00:00
Antony Dovgal
9e8c4eb56d fix test 2006-08-08 09:23:11 +00:00
Antony Dovgal
8320b9a8f0 fix typo and invalid read 2006-08-08 08:59:51 +00:00
Antony Dovgal
5f50f4ac84 fix test in unicode mode 2006-08-07 22:16:09 +00:00
Antony Dovgal
d8cef5a15d fix test 2006-08-07 22:14:15 +00:00
Andrei Zmievski
50cb40f389 Simplify strrchr(). 2006-08-04 23:20:04 +00:00
Andrei Zmievski
ad017699b1 Upgrade pathinfo() to Unicode support. 2006-08-04 21:06:11 +00:00
Andrei Zmievski
9ff2107cc1 Upgrade dirname() to support IS_UNICODE. 2006-08-04 18:09:46 +00:00
Antony Dovgal
fa6d24b330 add new test 2006-08-04 15:01:29 +00:00
Antony Dovgal
7d109bc627 fix #38322 (reading past array in sscanf() leads to arbitary code execution) 2006-08-04 11:49:18 +00:00
Andrei Zmievski
49f1d3a779 Upgraded basename() to work on IS_UNICODE strings as well. 2006-08-03 23:45:27 +00:00
Andrei Zmievski
768a9227ed - Adjusted php_u_strtoupper/php_u_strtolower/php_u_strtotitle API to be
more sane.
- Upgrade strtoupper(), strtolower(), strtotitle() to use params API.
2006-08-03 23:09:29 +00:00
Andrei Zmievski
72adc1b397 Update similar_text() to use params API. 2006-08-03 21:46:16 +00:00
Andrei Zmievski
f6f8792be4 A few fixes noted during analysis. 2006-08-02 21:53:43 +00:00
Andrei Zmievski
09811323a9 bin2hex() should accept only binary strings. 2006-08-02 20:38:39 +00:00
Dmitry Stogov
be56f79c6f zts fix 2006-08-02 07:54:41 +00:00
Andrei Zmievski
263d329acd Fix leaks. 2006-08-02 02:11:56 +00:00
Andrei Zmievski
b67e1d9f92 Add SORT_LOCALE_STRING support to array_multisort() and mark it with U. 2006-08-01 22:28:26 +00:00
Andrei Zmievski
7b0fc1bb1c Whew. Fix up extract to params API, Unicode support, and simplify it as
well.
2006-08-01 21:50:44 +00:00
Antony Dovgal
20b0975a43 fix test
I really hope there are no systems where /dev is a symlink
2006-07-28 13:47:41 +00:00
Antony Dovgal
f6de0063dd patch for #37846 (wordwrap() wraps incorrectly)
by Dmitry Kononov <ddk at krasn dot ru>
2006-07-28 12:21:34 +00:00
Antony Dovgal
9f8046454b fix compile warning on Solaris, getloadavg() is in sys/loadavg.h there 2006-07-26 08:57:11 +00:00
Hannes Magnusson
0ba734cb6e Update protos & arginfo for memory_get_usage() & memory_get_peak_usage() 2006-07-25 16:40:11 +00:00
Dmitry Stogov
61d39cf1c1 Changed memory_get_usage() and memory_get_peak_usage(). Optional boolean argument allows get memory size allocated by emalloc() (by default) or real size of memory allocated from system. 2006-07-25 13:41:08 +00:00
Marcus Boerger
7dfc69f42e - Correctly handle binary proeprty names which are not mangled 2006-07-24 23:28:00 +00:00
Marcus Boerger
eb0fd63012 - zend_(u_)_unmangle_property_name() has changed 2006-07-24 17:55:41 +00:00
Marcus Boerger
f55c2d0885 - Tiny piece of unicode support 2006-07-23 06:05:23 +00:00
Andrei Zmievski
bcb2df2974 Apply Matt W's patch (with a fix) for array_combine() binary key safety. 2006-07-21 23:47:40 +00:00
Andrei Zmievski
54528ce322 Remove references to BG(user_compare_fnnc_name).
# Less bickering, more coding!
2006-07-21 23:29:25 +00:00
Andrei Zmievski
d32d425468 Make array_*intersect* functions use params API with FCI cache and mark
them with U.
2006-07-21 23:25:08 +00:00
Dmitry Stogov
7a09b15702 ZTS fix 2006-07-21 07:34:18 +00:00
Andrei Zmievski
40b4c60b9a Make array_walk(_recursive) use params API with FCI cache and mark them
with U.
2006-07-20 23:21:32 +00:00
Andrei Zmievski
6e9dcc4800 Make all array_*diff* functions use params API (along with FCI cache)
and mark them with U.

# What a mess (before my changes of course) :)
2006-07-20 22:51:20 +00:00
Andrei Zmievski
e9a9a26e7e Rewrite array_map() to use params API with fci cache and mark it with U. 2006-07-20 20:54:23 +00:00
foobar
b3f926bf21 update 2006-07-20 10:08:31 +00:00
Michael Wallner
73ba3e2592 - added error_get_last() function 2006-07-19 12:25:02 +00:00
Dmitry Stogov
6687f0377b New memory manager 2006-07-18 09:08:06 +00:00
Andrei Zmievski
675832c204 Update array_filter() and array_reduce() to use params API with FCI
cache and mark them with U.
2006-07-17 22:18:01 +00:00
Andrei Zmievski
34e5b3befa Upgrade uasort() and uksort() to use params API with FCI cache and mark
them with U.
2006-07-17 21:20:02 +00:00
Andrei Zmievski
fdf280b41b - Upgrade usort() to support Unicode (including valid Unicode callbacks).
- Make usort() use 'f' specifier for function call info/cache.
2006-07-17 20:52:12 +00:00
Michael Wallner
6ad2093794 MFB52: fix bug #37945 pathinfo() cannot handle argument with special
characters like german "Umlaute"
2006-07-17 20:43:07 +00:00
Andrei Zmievski
0bb270d352 - Use zend_uchar for param type
- %v is for UG() - dependent strings, which is not the case here
- 'T' is only useful for multiple parameters, so use 't' instead
2006-07-17 19:32:10 +00:00
Antony Dovgal
a3952b7495 tweak constant() to use the brand new unicode parameters API 2006-07-17 07:11:06 +00:00
Antony Dovgal
8177adf8fb make use of new param parsing API
use convert_to_text(), which makes constant() unicode aware
finally nuke invalid reads
2006-07-17 07:02:26 +00:00
Antony Dovgal
688000ca74 fix access to freed memory in pathinfo()
add test
2006-07-17 06:44:45 +00:00
Antony Dovgal
50242cd8c5 3+1 != 3 =) 2006-07-16 15:59:02 +00:00
Pierre Joye
02a92e7eb5 - MFB: PATHINFO_FILENAME constant registration (Sara) 2006-07-16 15:56:00 +00:00
Antony Dovgal
6b4bfe4a35 all stream functions are actually macros that already have TSRMLS_CC,
no need to pass it manually
2006-07-16 15:54:25 +00:00
Marcus Boerger
5544029699 - Fixed Bug #29538 number_format and problem with 0 2006-07-16 10:49:06 +00:00
Marcus Boerger
92a47b44b4 - Pathinfo allows to get filename (Toby S, Christian S) 2006-07-16 10:34:32 +00:00
Marcus Boerger
d795e0b9bb - Implement todo: SplFileObject: ability to set the CSV separator per object 2006-07-15 14:31:51 +00:00
Marcus Boerger
dd47d64887 - Readd proto 2006-07-15 12:09:13 +00:00
Marcus Boerger
adc5a7f087 - Update array_fill_keys, better unicode support, use new param parsing API 2006-07-15 12:06:10 +00:00
Marcus Boerger
da5c076100 - Add array_fill_keys() (Matt W, php_lists at realplain com) 2006-07-15 10:10:47 +00:00
Andrei Zmievski
246585490b Add test for compact(). 2006-07-14 23:04:58 +00:00
Andrei Zmievski
853ab6e09f Adjust array_pad(), array_reverse(), and array_unique() for params API
and mark them with U.
2006-07-14 22:41:22 +00:00
Andrei Zmievski
5766cdbd01 - Simplify array_combine() and adjust for params API
- Adjust array_count_values() and array_rand() for params API and mark
  with U
2006-07-14 22:15:54 +00:00
Andrei Zmievski
40cabdca59 Adjust array_key_exists(), array_slice(), and array_splice() for params
API and mark them with U.
2006-07-14 21:16:30 +00:00
Sara Golemon
74eb59da59 #38105 (4/3) ustrlen != USTRLEN, update variable names used to keep this block's meaning clear 2006-07-14 20:50:45 +00:00
Antony Dovgal
44ad98405f MFB: rephrase the error message (fixes #38106) 2006-07-14 20:45:37 +00:00
Andrei Zmievski
8d28257255 Make array_change_key_case() -- a candidate for the quite possibly the
most useless function ever -- use params API and mark it with U.
2006-07-14 20:07:57 +00:00
Sara Golemon
165b2f2b76 #38105 (3/3) Default file_put_contents() to FILE_TEXT when unicode.semantics=on and flags param not specified 2006-07-14 19:16:23 +00:00
Andrei Zmievski
6dfb4768b4 Update end(), prev(), next(), reset(), current(), and key() for params
API and mark with U.
2006-07-14 18:12:45 +00:00
Andrei Zmievski
0322c14d14 Update array_search()/in_array() for params API and mark with U. 2006-07-14 18:03:13 +00:00
Andrei Zmievski
f344fe0153 Update array_keys() and array_values() for params API and mark with U. 2006-07-14 17:55:27 +00:00
Andrei Zmievski
c30d1ecf11 - Simplify array_fill().
- Do params API for a couple of funcs and mark them as Unicode
  compliant.
2006-07-14 17:35:54 +00:00
Antony Dovgal
8d8344272e WS and CS fixes
I suppose STR_FREE() is better than if(..) {efree (..);}
2006-07-14 08:38:30 +00:00
Dmitry Stogov
73001d4257 Fixed unserialize() in unicode mode 2006-07-14 08:29:06 +00:00
Andrei Zmievski
f717e25ce7 FIXME note 2006-07-13 22:26:50 +00:00
Andrei Zmievski
c8254d82d7 Update array_sum() and array_product() (U). 2006-07-13 22:26:42 +00:00
Andrei Zmievski
8553cf9da8 Mark a few more funcs. 2006-07-13 22:03:42 +00:00
Andrei Zmievski
2fbc36496f - Let the caller output a warning instead of having
zend_get_unified_string_type() do it.
- Mark a few more functions are Unicode compatible.
2006-07-13 21:27:48 +00:00
Andrei Zmievski
c01957091a - Make compact() normalize variablem name before checking symtable.
- Mark tested/upgraded functions with 'U' flag.
2006-07-13 21:08:43 +00:00
Antony Dovgal
87d846c2cb initialize variables 2006-07-13 17:55:50 +00:00
Antony Dovgal
12f44c2b2b fix #38086 (stream_copy_to_stream() returns 0 when maxlen is bigger than the actual length) 2006-07-13 11:58:42 +00:00
Antony Dovgal
9aa7c1d6e9 fix assert() in Unicode mode 2006-07-12 22:19:12 +00:00
Andrei Zmievski
938f6d4141 Use zend_convert_from_unicode() in var_dump(). 2006-07-12 17:23:53 +00:00
Antony Dovgal
9de18e2ca2 don't try to compare strings if haystack is "" or shorter than needle
add test
2006-07-12 12:33:04 +00:00
Antony Dovgal
8db69d4005 add new tests by Ligaya Turmelle 2006-07-11 21:28:07 +00:00
Antony Dovgal
f41a4f4546 /tmp is often a symlink, use /bin instead 2006-07-11 21:19:56 +00:00
Dmitry Stogov
14a10f441d Fixed bug #37947 (zend_ptr_stack reallocation problem) 2006-07-10 14:02:54 +00:00
Hannes Magnusson
8f1d44beea make everyone happy 2006-07-03 22:41:46 +00:00
Hannes Magnusson
302deb04d8 fix tests 2006-07-03 16:03:39 +00:00
Hannes Magnusson
12fbcb6344 nuke types in arginfo 2006-07-02 00:10:36 +00:00
Nuno Lopes
ec2b150da0 MFB5.2: fix assert() problems 2006-07-01 12:29:38 +00:00
Hannes Magnusson
226fa23b51 Do not force pass by-ref, these functions only prefer by-ref 2006-06-30 18:16:50 +00:00
Antony Dovgal
9f65fd37c6 add error messages to disk_free_space() & disk_total_space() (feature request #37971) 2006-06-30 10:52:51 +00:00
Antony Dovgal
a6e26b742a fix off-by-one in addslashes() in Unicode mode 2006-06-30 09:35:21 +00:00
Hannes Magnusson
d03ba9cdc5 fix test 2006-06-29 14:53:31 +00:00
Hannes Magnusson
b9c078acf4 url->URL 2006-06-29 14:42:30 +00:00
Hannes Magnusson
0a2cfcce41 MFB: url -> URL 2006-06-29 14:32:24 +00:00
Antony Dovgal
bfceaaf1d1 unicode_semantics -> unicode.semantics 2006-06-28 15:07:14 +00:00
Hannes Magnusson
ba0175365c arginfo fixes 2006-06-27 22:14:07 +00:00
Hannes Magnusson
29ca8007ee Add arginfo for sys_getloadavg()
iUpdate arginfo for base64_decode()
2006-06-26 22:19:04 +00:00
Hannes Magnusson
0cce3777ea MFB: bug #37244 (base64_decode violates RFC 3548)
-Add test
2006-06-26 22:17:43 +00:00
Hannes Magnusson
e9c59b98ac MFB: sys_getloadavg() 2006-06-26 20:28:30 +00:00
Rasmus Lerdorf
157ce4f35e Cleaner fix 2006-06-26 13:10:31 +00:00
Rasmus Lerdorf
eef9835bb1 sapi_getenv() estrdups the returned string now, so we need to free it 2006-06-26 13:03:41 +00:00
Hannes Magnusson
731c3e4db0 Removed custom deprecate error messages
Use the fancy ZEND_ACC_DEPRECATED flag.
2006-06-26 11:31:19 +00:00
Hannes Magnusson
f4ea75f240 Added argument info
(forces user-space filters to register correct arguments)
Added tests
2006-06-25 22:51:55 +00:00
Antony Dovgal
361c7da159 MFB: improve test 2006-06-25 21:23:38 +00:00