summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Loyet <fat@php.net>2012-08-30 08:53:36 +0200
committerJerome Loyet <fat@php.net>2012-08-30 08:53:36 +0200
commit557200b47227477382c409c7d5cca627534b514b (patch)
tree1678b851c63126c1eb54366a8c6fb52be3b478d2
parent5799ebdb0cafb2de1dbb18cfe780976c98dbaeac (diff)
parent0410b4e60f6b4b3a105c0866b797dc47a58ec594 (diff)
downloadphp-git-557200b47227477382c409c7d5cca627534b514b.tar.gz
Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3
* 'PHP-5.3' of git.php.net:php-src: (59 commits) Fixed defective cloning in ext/intl classes Fixed bug (segfault while build with zts and GOTO vm-kind) better fix Fix test Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray) ZTS fix introduced by Felipe must also go into 5.3 Updated INSTALL. Generated from the XML Docs. Update NEWS given a5d0c1e2 Fix handling of several uinitialized intl objects Fixed bug #62885 (mysqli_poll - Segmentation fault) - Removed PHP 6 checks skip test properly Added test for bug #51353. It'll be skipped by default and must be activated manually. Move test files to tests dir skip test for bug 43130 on firebird , not relevant - Value stored to var is never used - Value stored to var is never used - Value stored to var is never used - Value stored to var is never used - Value stored to var is never used ...
-rw-r--r--.gitattributes1
-rw-r--r--INSTALL202
-rw-r--r--NEWS39
-rw-r--r--Zend/tests/bug55509.phpt6
-rw-r--r--Zend/tests/bug62680.phpt13
-rw-r--r--Zend/tests/bug62763.phpt23
-rw-r--r--Zend/zend_API.c14
-rw-r--r--Zend/zend_API.h5
-rw-r--r--Zend/zend_language_scanner.c6
-rw-r--r--Zend/zend_language_scanner.l4
-rw-r--r--Zend/zend_language_scanner_defs.h2
-rw-r--r--Zend/zend_stream.c2
-rw-r--r--Zend/zend_vm_execute.skl2
-rw-r--r--Zend/zend_vm_gen.php7
-rw-r--r--configure.in4
-rw-r--r--ext/curl/interface.c4
-rw-r--r--ext/curl/tests/bug62839.phpt18
-rw-r--r--ext/date/php_date.c16
-rw-r--r--ext/date/tests/bug62852.phpt15
-rw-r--r--ext/dom/documenttype.c4
-rw-r--r--ext/dom/element.c4
-rw-r--r--ext/dom/node.c8
-rwxr-xr-xext/enchant/enchant.c3
-rwxr-xr-xext/exif/tests/bug60150.phpt2
-rw-r--r--ext/fileinfo/fileinfo.c2
-rw-r--r--[-rwxr-xr-x]ext/intl/CREDITS0
-rw-r--r--[-rwxr-xr-x]ext/intl/TODO0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_attr.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_attr.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_class.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_class.h9
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_compare.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_compare.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_convert.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_convert.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_create.c2
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_create.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_error.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_error.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_is_numeric.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_is_numeric.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_locale.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_locale.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_sort.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/collator/collator_sort.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/common/common_error.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/common/common_error.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/config.m40
-rw-r--r--[-rwxr-xr-x]ext/intl/config.w320
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat.c2
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_attr.c5
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_attr.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_class.c23
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_class.h10
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_data.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_data.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_format.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_format.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_parse.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/dateformat/dateformat_parse.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/doc/Tutorial.txt0
-rw-r--r--[-rwxr-xr-x]ext/intl/doc/collator_api.php0
-rw-r--r--[-rwxr-xr-x]ext/intl/doc/common_api.php0
-rw-r--r--[-rwxr-xr-x]ext/intl/doc/datefmt_api.php0
-rw-r--r--[-rwxr-xr-x]ext/intl/doc/formatter_api.php0
-rw-r--r--[-rwxr-xr-x]ext/intl/doc/grapheme_api.php0
-rw-r--r--[-rwxr-xr-x]ext/intl/doc/locale_api.php0
-rw-r--r--[-rwxr-xr-x]ext/intl/doc/msgfmt_api.php0
-rw-r--r--[-rwxr-xr-x]ext/intl/doc/normalizer_api.php0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_attr.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_attr.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_class.c25
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_class.h15
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_data.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_data.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_format.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_format.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_main.c2
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_main.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_parse.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/formatter/formatter_parse.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/grapheme/grapheme.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/grapheme/grapheme_string.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/grapheme/grapheme_util.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/grapheme/grapheme_util.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/intl_common.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/intl_convert.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/intl_convert.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/intl_data.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/intl_error.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/intl_error.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/locale/locale.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/locale/locale.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/locale/locale_class.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/locale/locale_class.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/locale/locale_methods.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/locale/locale_methods.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat.c2
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_attr.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_attr.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_class.c24
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_class.h10
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_data.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_data.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_format.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_format.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_helpers.cpp0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_helpers.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_parse.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_parse.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/normalizer/normalizer.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/normalizer/normalizer.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/normalizer/normalizer_class.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/normalizer/normalizer_class.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/normalizer/normalizer_normalize.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/normalizer/normalizer_normalize.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/php_intl.c0
-rw-r--r--[-rwxr-xr-x]ext/intl/php_intl.h0
-rw-r--r--[-rwxr-xr-x]ext/intl/resourcebundle/TODO0
-rw-r--r--ext/intl/resourcebundle/resourcebundle_class.c9
-rw-r--r--ext/intl/resourcebundle/resourcebundle_class.h11
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/_files/es-bundle.txt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/_files/res_index.txt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/_files/resourcebundle.txt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/_files/resourcebundle/es.resbin384 -> 384 bytes
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/_files/resourcebundle/res_index.resbin128 -> 128 bytes
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/_files/resourcebundle/root.resbin388 -> 388 bytes
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/badargs.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/bug12887.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/bug14562.phpt0
-rw-r--r--ext/intl/tests/bug59597_64.phpt3
-rw-r--r--ext/intl/tests/bug62070.phpt2
-rw-r--r--ext/intl/tests/bug62915-2.phpt29
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collation_customization.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_asort.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_compare.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_create.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_get_error_code.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_get_error_message.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_get_locale.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_get_set_attribute.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_get_set_strength.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_get_sort_key.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_sort.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/collator_sort_with_sort_keys.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_clone.phpt0
-rw-r--r--ext/intl/tests/dateformat_clone_bad_obj.phpt20
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_format.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_format_parse.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_get_datetype.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_get_locale.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_get_set_calendar.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_get_set_pattern.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_get_timetype.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_get_timezone_id.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_is_set_lenient.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_localtime.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_parse.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_parse_localtime_parsepos.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/dateformat_set_timezone_id.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_clone.phpt0
-rw-r--r--ext/intl/tests/formatter_clone_bad_obj.phpt20
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_fail.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_format.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_format_conv.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_format_currency.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_get_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_get_locale.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_get_set_attribute.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_get_set_pattern.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_get_set_symbol.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_get_set_text_attribute.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_parse.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/formatter_parse_currency.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/grapheme.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/idn.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/intl_error_name.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/intl_get_error_code.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/intl_get_error_message.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/intl_is_failure.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_accept.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_compose_locale.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_filter_matches.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_all_variants.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_default.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_display_language.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_display_name.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_display_region.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_display_script.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_display_variant.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_keywords.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_primary_language.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_region.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_get_script.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_lookup.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_parse_locale.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/locale_set_default.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/msgfmt_clone.phpt0
-rw-r--r--ext/intl/tests/msgfmt_clone_bad_obj.phpt20
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/msgfmt_fail.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/msgfmt_format.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/msgfmt_get_error.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/msgfmt_get_locale.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/msgfmt_get_set_pattern.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/msgfmt_parse.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/normalizer_normalize.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/regression_sort_and_cow.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/regression_sort_eq.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/regression_sortwsk_and_cow.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/regression_sortwsk_eq.phpt0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/resourcebundle.build0
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/resourcebundle_locales.phpt0
-rw-r--r--ext/intl/tests/symfony_format_type_double_intl1.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_double_intl2.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_double_intl3.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_double_intl4.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int32_intl1.phpt49
-rw-r--r--ext/intl/tests/symfony_format_type_int32_intl2.phpt33
-rw-r--r--ext/intl/tests/symfony_format_type_int32_intl3.phpt32
-rw-r--r--ext/intl/tests/symfony_format_type_int32_intl4.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int32_intl5.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int32_intl6.phpt32
-rw-r--r--ext/intl/tests/symfony_format_type_int32_intl7.phpt32
-rw-r--r--ext/intl/tests/symfony_format_type_int64_intl1.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int64_intl2.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int64_intl3.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int64_intl4.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int64_intl5.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int64_intl6.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int64_intl7.phpt30
-rw-r--r--ext/intl/tests/symfony_format_type_int64_intl8.phpt30
-rw-r--r--[-rwxr-xr-x]ext/intl/tests/ut_common.inc0
-rw-r--r--ext/mcrypt/tests/mcrypt_cfb.phpt (renamed from ext/mcrypt/tests/mcrypt_cbf.phpt)6
-rw-r--r--ext/mcrypt/tests/mcrypt_create_iv.phpt8
-rw-r--r--ext/mysql/tests/mysql_query_load_data_openbasedir.phpt3
-rw-r--r--ext/mysqli/mysqli_nonapi.c5
-rw-r--r--ext/mysqli/tests/bug62885.phpt26
-rw-r--r--ext/oci8/tests/bind_char_2_11gR1.phpt2
-rw-r--r--ext/oci8/tests/bind_char_3_11gR1.phpt2
-rw-r--r--ext/oci8/tests/bind_char_4_11gR1.phpt2
-rw-r--r--ext/oci8/tests/details.inc53
-rw-r--r--ext/oci8/tests/pecl_bug10194.phpt3
-rw-r--r--ext/oci8/tests/pecl_bug10194_blob.phpt3
-rw-r--r--ext/oci8/tests/pecl_bug10194_blob_64.phpt3
-rw-r--r--ext/oci8/tests/xmltype_01.phpt1
-rwxr-xr-xext/pdo/pdo_dbh.c2
-rw-r--r--ext/pdo/tests/bug_43130.phpt1
-rw-r--r--ext/phar/phar.c5
-rw-r--r--ext/phar/phar_object.c137
-rw-r--r--ext/phar/stream.c13
-rw-r--r--ext/phar/tar.c5
-rw-r--r--ext/phar/tests/008.phpt2
-rw-r--r--ext/phar/tests/009.phpt1
-rw-r--r--ext/phar/tests/010.phpt1
-rw-r--r--ext/phar/tests/011.phpt1
-rw-r--r--ext/phar/tests/012.phpt1
-rw-r--r--ext/phar/tests/018.phpt3
-rwxr-xr-xext/phar/tests/019b.phpt1
-rwxr-xr-xext/phar/tests/019c.phpt1
-rw-r--r--ext/phar/tests/020.phpt3
-rw-r--r--ext/phar/tests/021.phpt3
-rw-r--r--ext/phar/tests/022.phpt1
-rwxr-xr-xext/phar/tests/028.phpt1
-rw-r--r--ext/phar/tests/cache_list/copyonwrite1.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite10.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite11.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite12.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite13.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite14.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite15.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite16.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite17.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite18.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite19.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite2.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite20.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite21.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite22.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite23.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite24.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite25.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite3.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite4.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite4a.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite5.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite6.phar.phpt1
-rw-r--r--ext/phar/tests/cache_list/copyonwrite7.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite8.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/copyonwrite9.phar.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller1.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller10.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller11.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller12.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller13.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller14.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller15.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller16.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller17.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller18.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller19.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller2.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller20.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller21.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller22.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller23.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller24.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller25.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller26.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller27.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller28.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller29.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller3.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller30.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller31.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller32.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller33.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller34.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller4.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller5.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller6.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller7.phpt1
-rw-r--r--ext/phar/tests/cache_list/frontcontroller8.phpt3
-rw-r--r--ext/phar/tests/cache_list/frontcontroller9.phpt3
-rw-r--r--ext/phar/tests/delete.phpt3
-rw-r--r--ext/phar/tests/fatal_error_webphar.phpt3
-rw-r--r--ext/phar/tests/file_get_contents.phpt3
-rw-r--r--ext/phar/tests/fopen.phpt3
-rw-r--r--ext/phar/tests/front.phar.phpt1
-rw-r--r--ext/phar/tests/frontcontroller1.phpt2
-rw-r--r--ext/phar/tests/frontcontroller10.phpt1
-rw-r--r--ext/phar/tests/frontcontroller12.phpt3
-rw-r--r--ext/phar/tests/frontcontroller13.phpt3
-rw-r--r--ext/phar/tests/frontcontroller14.phpt2
-rw-r--r--ext/phar/tests/frontcontroller15.phpt1
-rw-r--r--ext/phar/tests/frontcontroller16.phpt1
-rw-r--r--ext/phar/tests/frontcontroller17.phpt2
-rw-r--r--ext/phar/tests/frontcontroller18.phpt2
-rw-r--r--ext/phar/tests/frontcontroller19.phpt2
-rw-r--r--ext/phar/tests/frontcontroller2.phpt1
-rw-r--r--ext/phar/tests/frontcontroller20.phpt2
-rw-r--r--ext/phar/tests/frontcontroller21.phpt3
-rw-r--r--ext/phar/tests/frontcontroller22.phpt3
-rw-r--r--ext/phar/tests/frontcontroller23.phpt3
-rw-r--r--ext/phar/tests/frontcontroller24.phpt3
-rw-r--r--ext/phar/tests/frontcontroller25.phpt3
-rw-r--r--ext/phar/tests/frontcontroller26.phpt4
-rw-r--r--ext/phar/tests/frontcontroller27.phpt3
-rw-r--r--ext/phar/tests/frontcontroller28.phpt1
-rw-r--r--ext/phar/tests/frontcontroller29.phpt3
-rw-r--r--ext/phar/tests/frontcontroller3.phpt1
-rw-r--r--ext/phar/tests/frontcontroller30.phpt4
-rw-r--r--ext/phar/tests/frontcontroller31.phpt3
-rw-r--r--ext/phar/tests/frontcontroller32.phpt3
-rw-r--r--ext/phar/tests/frontcontroller33.phpt3
-rw-r--r--ext/phar/tests/frontcontroller34.phpt1
-rw-r--r--ext/phar/tests/frontcontroller4.phpt2
-rw-r--r--ext/phar/tests/frontcontroller5.phpt2
-rw-r--r--ext/phar/tests/frontcontroller6.phpt4
-rw-r--r--ext/phar/tests/frontcontroller7.phpt2
-rw-r--r--ext/phar/tests/frontcontroller8.phpt4
-rw-r--r--ext/phar/tests/frontcontroller9.phpt3
-rw-r--r--ext/phar/tests/include_path_advanced.phpt3
-rw-r--r--ext/phar/tests/mounteddir.phpt1
-rw-r--r--ext/phar/tests/opendir.phpt3
-rw-r--r--ext/phar/tests/phar_gzip.phpt3
-rw-r--r--ext/phar/tests/phar_magic.phpt1
-rw-r--r--ext/phar/tests/phar_mount.phpt3
-rw-r--r--ext/phar/tests/phpinfo_003.phpt2
-rw-r--r--ext/phar/tests/readfile.phpt3
-rw-r--r--ext/phar/tests/rename.phpt3
-rw-r--r--ext/phar/tests/rename_dir.phpt1
-rwxr-xr-xext/phar/tests/rename_dir_and_mount.phpt1
-rw-r--r--ext/phar/tests/rmdir.phpt1
-rw-r--r--ext/phar/tests/security.phpt3
-rw-r--r--ext/phar/tests/stat.phpt3
-rw-r--r--ext/phar/tests/withphar.phpt2
-rw-r--r--ext/phar/tests/withphar_web.phpt2
-rw-r--r--ext/phar/tests/zip/notphar.phpt1
-rw-r--r--ext/phar/util.c2
-rw-r--r--ext/phar/zip.c16
-rw-r--r--ext/reflection/php_reflection.c8
-rw-r--r--ext/reflection/tests/bug62715.phpt24
-rw-r--r--ext/session/mod_user.c2
-rw-r--r--ext/simplexml/simplexml.c4
-rwxr-xr-xext/spl/spl_directory.c1
-rw-r--r--ext/spl/spl_fixedarray.c12
-rw-r--r--ext/spl/tests/bug62904.phpt19
-rw-r--r--ext/standard/basic_functions.c7
-rw-r--r--ext/standard/file.c1
-rw-r--r--ext/standard/string.c1
-rw-r--r--ext/standard/tests/file/realpath_cache.phpt2
-rw-r--r--ext/standard/tests/streams/bug61115-1.phpt6
-rw-r--r--ext/standard/tests/strings/str_pad_variation5.phpt3
-rw-r--r--ext/standard/url.c8
-rw-r--r--ext/xmlrpc/tests/bug61264.phpt2
-rw-r--r--ext/zip/tests/bug51353.phpt54
-rw-r--r--tests/lang/bug45392.phpt5
404 files changed, 1543 insertions, 455 deletions
diff --git a/.gitattributes b/.gitattributes
index d53e569db1..862575bbb8 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -15,6 +15,7 @@ ext/dba/libflatfile/flatfile.c ident
ext/dba/libcdb/cdb_make.c ident
ext/dba/libcdb/cdb.c ident
ext/filter/filter.c ident
+ext/zip/php_zip.c ident
README.input_filter ident
run-tests.php ident
sapi/nsapi/nsapi.c ident
diff --git a/INSTALL b/INSTALL
index b493f3c29b..c0cbe5f2c1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -24,6 +24,7 @@ Installing PHP
+ Installing a PHP extension on Windows
+ Compiling shared PECL extensions with the pecl command
+ Compiling shared PECL extensions with phpize
+ + php-config
+ Compiling PECL extensions statically into PHP
* Problems?
+ Read the FAQ
@@ -83,7 +84,7 @@ General Installation Considerations
With PHP you can also write desktop GUI applications using the PHP-GTK
extension. This is a completely different approach than writing web
pages, as you do not output any HTML, but manage windows and objects
- within them. For more information about PHP-GTK, please » visit the
+ within them. For more information about PHP-GTK, please » visit the
site dedicated to this extension. PHP-GTK is not included in the
official PHP distribution.
@@ -92,9 +93,9 @@ General Installation Considerations
will also find information on the command line executable in the
following sections.
- PHP source code and binary distributions for Windows can be found at »
- http://www.php.net/downloads.php. We recommend you to choose a » mirror
- nearest to you for downloading the distributions.
+ PHP source code and binary distributions for Windows can be found at
+ » http://www.php.net/downloads.php. We recommend you to choose a
+ » mirror nearest to you for downloading the distributions.
__________________________________________________________________
__________________________________________________________________
@@ -140,9 +141,9 @@ Table of Contents
* A web server
* Any module specific components (such as GD, PDF libs, etc.)
- When building directly from SVN sources or after custom modifications
+ When building directly from Git sources or after custom modifications
you might also need:
- * autoconf: 2.13
+ * autoconf: 2.13+ (for PHP < 5.4.0), 2.59+ (for PHP >= 5.4.0)
* automake: 1.4+
* libtool: 1.4.x+ (except 1.4.2)
* re2c: Version 0.13.4 or newer
@@ -375,12 +376,12 @@ Apache 2.x on Unix systems
For information on why, read the related FAQ entry on using Apache2
with a threaded MPM
- The » Apache Documentation is the most authoritative source of
+ The » Apache Documentation is the most authoritative source of
information on the Apache 2.x server. More information about
installation options for Apache may be found there.
- The most recent version of Apache HTTP Server may be obtained from »
- Apache download site, and a fitting PHP version from the above
+ The most recent version of Apache HTTP Server may be obtained from
+ » Apache download site, and a fitting PHP version from the above
mentioned places. This quick guide covers only the basics to get
started with Apache 2.x and PHP. For more information read the » Apache
Documentation. The version numbers have been omitted here, to ensure
@@ -498,7 +499,7 @@ service httpd restart
This should not be undertaken without being aware of the consequences
of this decision, and having at least a fair understanding of the
- implications. The Apache documentation regarding » MPM-Modules
+ implications. The Apache documentation regarding » MPM-Modules
discusses MPMs in a great deal more detail.
Note:
@@ -520,7 +521,7 @@ Lighttpd 1.4 on Unix systems
This section contains notes and hints specific to Lighttpd 1.4 installs
of PHP on Unix systems.
- Please use the » Lighttpd trac to learn how to install Lighttpd
+ Please use the » Lighttpd trac to learn how to install Lighttpd
properly before continuing.
Fastcgi is the preferred SAPI to connect PHP and Lighttpd. Fastcgi is
@@ -627,15 +628,15 @@ Sun, iPlanet and Netscape servers on Sun Solaris
current web servers read the note about subrequests.
You can find more information about setting up PHP for the Netscape
- Enterprise Server (NES) here: »
- http://benoit.noss.free.fr/php/install-php4.html
+ Enterprise Server (NES) here:
+ » http://benoit.noss.free.fr/php/install-php4.html
To build PHP with Sun JSWS/Sun ONE WS/iPlanet/Netscape web servers,
enter the proper install directory for the --with-nsapi=[DIR] option.
The default directory is usually /opt/netscape/suitespot/. Please also
read /php-xxx-version/sapi/nsapi/nsapi-readme.txt.
- 1. Install the following packages from » http://www.sunfreeware.com/
+ 1. Install the following packages from » http://www.sunfreeware.com/
or another download site:
+ autoconf-2.13
+ automake-1.4
@@ -837,7 +838,7 @@ Testing
Using Variables
Some server supplied environment variables are not defined in the
- current » CGI/1.1 specification. Only the following variables are
+ current » CGI/1.1 specification. Only the following variables are
defined there: AUTH_TYPE, CONTENT_LENGTH, CONTENT_TYPE,
GATEWAY_INTERFACE, PATH_INFO, PATH_TRANSLATED, QUERY_STRING,
REMOTE_ADDR, REMOTE_HOST, REMOTE_IDENT, REMOTE_USER, REQUEST_METHOD,
@@ -855,20 +856,20 @@ HP-UX specific installation notes
There are two main options for installing PHP on HP-UX systems. Either
compile it, or install a pre-compiled binary.
- Official pre-compiled packages are located here: »
- http://software.hp.com/
+ Official pre-compiled packages are located here:
+ » http://software.hp.com/
Until this manual section is rewritten, the documentation about
compiling PHP (and related extensions) on HP-UX systems has been
- removed. For now, consider reading the following external resource: »
- Building Apache and PHP on HP-UX 11.11
+ removed. For now, consider reading the following external resource:
+ » Building Apache and PHP on HP-UX 11.11
__________________________________________________________________
__________________________________________________________________
OpenBSD installation notes
- This section contains notes and hints specific to installing PHP on »
- OpenBSD 3.6.
+ This section contains notes and hints specific to installing PHP on
+ » OpenBSD 3.6.
Using Binary Packages
@@ -900,12 +901,12 @@ Using Binary Packages
(install the PEAR libraries)
# pkg_add php4-pear-4.3.8.tgz
- Read the » packages(7) manual page for more information about binary
+ Read the » packages(7) manual page for more information about binary
packages on OpenBSD.
Using Ports
- You can also compile up PHP from source using the » ports tree.
+ You can also compile up PHP from source using the » ports tree.
However, this is only recommended for users familiar with OpenBSD. The
PHP 4 port is split into two sub-directories: core and extensions. The
extensions directory generates sub-packages for all of the supported
@@ -926,7 +927,7 @@ Common Problems
automatically installs into the correct chroot directories, so no
special modification is needed there. More information on the
OpenBSD Apache is available in the » OpenBSD FAQ.
- * The OpenBSD 3.6 package for the » gd extension requires XFree86 to
+ * The OpenBSD 3.6 package for the » gd extension requires XFree86 to
be installed. If you do not wish to use some of the font features
that require X11, install the php4-gd-4.3.8-no_x11.tgz package
instead.
@@ -951,18 +952,26 @@ Required software
Solaris installs often lack C compilers and their related tools. Read
this FAQ for information on why using GNU versions for some of these
- tools is necessary. The required software is as follows:
+ tools is necessary.
+
+ For unpacking the PHP distribution you need
+ * tar
+ * gzip or
+ * bzip2
+
+ For compiling PHP you need
* gcc (recommended, other C compilers may work)
* make
- * flex
+ * GNU sed
+
+ For building extra extensions or hacking the code of PHP you might also
+ need
+ * flex (up to PHP 5.2)
+ * re2c
* bison
* m4
* autoconf
* automake
- * perl
- * gzip
- * tar
- * GNU sed
In addition, you will need to install (and possibly compile) any
additional software specific to your configuration, such as Oracle or
@@ -971,14 +980,16 @@ Required software
Using Packages
You can simplify the Solaris install process by using pkgadd to install
- most of your needed components.
+ most of your needed components. The Image Packaging System (IPS) for
+ Solaris 11 Express also contains most of the required components for
+ installation using the pkg command.
__________________________________________________________________
__________________________________________________________________
Debian GNU/Linux installation notes
- This section contains notes and hints specific to installing PHP on »
- Debian GNU/Linux.
+ This section contains notes and hints specific to installing PHP on
+ » Debian GNU/Linux.
Warning
Unofficial builds from third-parties are not supported here. Any bugs
@@ -1205,6 +1216,7 @@ Table of Contents
* Installing a PHP extension on Windows
* Compiling shared PECL extensions with the pecl command
* Compiling shared PECL extensions with phpize
+ * php-config
* Compiling PECL extensions statically into PHP
__________________________________________________________________
@@ -1227,8 +1239,8 @@ Introduction to PECL Installations
To this php.ini file, or through the use of the dl() function.
When building PHP modules, it's important to have known-good versions
- of the required tools (autoconf, automake, libtool, etc.) See the »
- Anonymous SVN Instructions for details on the required tools, and
+ of the required tools (autoconf, automake, libtool, etc.) See the
+ » Anonymous Git Instructions for details on the required tools, and
required versions.
__________________________________________________________________
__________________________________________________________________
@@ -1247,7 +1259,7 @@ Downloading PECL extensions
the PECL web site are available for download and installation using
the » pecl command. Specific revisions may also be specified.
* SVN Most PECL extensions also reside in SVN. A web-based view may
- be seen at » http://svn.php.net/viewvc/pecl/. To download straight
+ be seen at » http://svn.php.net/viewvc/pecl/. To download straight
from SVN, the following sequence of commands may be used:
$ svn checkout http://svn.php.net/repository/pecl/extname/trunk
extname
@@ -1279,7 +1291,7 @@ Where to find an extension?
PHP extensions are usually called "php_*.dll" (where the star
represents the name of the extension) and they are located under the
- "PHP\ext" ("PHP\extensions" in PHP4) folder.
+ "PHP\ext" ("PHP\extensions" in PHP 4) folder.
PHP ships with the extensions most useful to the majority of
developers. They are called "core" extensions.
@@ -1365,7 +1377,7 @@ Resolving problems
Compiling shared PECL extensions with the pecl command
- PECL makes it easy to create shared PHP extensions. Using the » pecl
+ PECL makes it easy to create shared PHP extensions. Using the » pecl
command, do the following:
$ pecl install extname
@@ -1424,6 +1436,51 @@ $ make
__________________________________________________________________
__________________________________________________________________
+php-config
+
+ php-config is a simple shell script for obtaining information about the
+ installed PHP configuration.
+
+ When compiling extensions, if you have multiple PHP versions installed,
+ you may specify for which installation you'd like to build by using the
+ --with-php-config option during configuration, specifying the path of
+ the respective php-config script.
+
+ The list of command line options provided by the php-config script can
+ be queried anytime by running php-config with the -h switch:
+Usage: /usr/local/bin/php-config [OPTION]
+Options:
+ --prefix [...]
+ --includes [...]
+ --ldflags [...]
+ --libs [...]
+ --extension-dir [...]
+ --include-dir [...]
+ --php-binary [...]
+ --php-sapis [...]
+ --configure-options [...]
+ --version [...]
+ --vernum [...]
+
+ CAPTION: Command line options
+
+ Option Description
+ --prefix Directory prefix where PHP is installed, e.g. /usr/local
+ --includes List of -I options with all include files
+ --ldflags LD Flags which PHP was compiled with
+ --libs Extra libraries which PHP was compiled with
+ --extension-dir Directory where extensions are searched by default
+ --include-dir Directory prefix where header files are installed by
+ default
+ --php-binary Full path to php CLI or CGI binary
+ --php-sapis Show all SAPI modules available
+ --configure-options Configure options to recreate configuration of
+ current PHP installation
+ --version PHP version
+ --vernum PHP version as integer
+ __________________________________________________________________
+ __________________________________________________________________
+
Compiling PECL extensions statically into PHP
You might find that you need to build a PECL extension statically into
@@ -1485,11 +1542,11 @@ Other problems
If you are still stuck, someone on the PHP installation mailing list
may be able to help you. You should check out the archive first, in
case someone already answered someone else who had the same problem as
- you. The archives are available from the support page on »
- http://www.php.net/support.php. To subscribe to the PHP installation
- mailing list, send an empty mail to »
- php-install-subscribe@lists.php.net. The mailing list address is »
- php-install@lists.php.net.
+ you. The archives are available from the support page on
+ » http://www.php.net/support.php. To subscribe to the PHP installation
+ mailing list, send an empty mail to
+ » php-install-subscribe@lists.php.net. The mailing list address is
+ » php-install@lists.php.net.
If you want to get help on the mailing list, please try to be precise
and give the necessary details about your environment (which operating
@@ -1504,11 +1561,11 @@ Bug reports
If you think you have found a bug in PHP, please report it. The PHP
developers probably don't know about it, and unless you report it,
chances are it won't be fixed. You can report bugs using the
- bug-tracking system at » http://bugs.php.net/. Please do not send bug
+ bug-tracking system at » http://bugs.php.net/. Please do not send bug
reports in mailing list or personal letters. The bug system is also
suitable to submit feature requests.
- Read the » How to report a bug document before submitting any bug
+ Read the » How to report a bug document before submitting any bug
reports!
__________________________________________________________________
__________________________________________________________________
@@ -1528,14 +1585,14 @@ The configuration file
The configuration file (php.ini) is read when PHP starts up. For the
server module versions of PHP, this happens only once when the web
- server is started. For the CGI and CLI version, it happens on every
+ server is started. For the CGI and CLI versions, it happens on every
invocation.
- php.ini is searched in these locations (in order):
+ php.ini is searched for in these locations (in order):
* SAPI module specific location (PHPIniDir directive in Apache 2, -c
command line option in CGI and CLI, php_ini parameter in NSAPI,
PHP_INI_PATH environment variable in THTTPD)
- * The PHPRC environment variable. Before PHP 5.2.0 this was checked
+ * The PHPRC environment variable. Before PHP 5.2.0, this was checked
after the registry key mentioned below.
* As of PHP 5.2.0, the location of the php.ini file can be set for
different versions of PHP. The following registry keys are examined
@@ -1543,33 +1600,33 @@ The configuration file
[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y] and
[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x], where x, y and z mean the PHP
major, minor and release versions. If there is a value for
- IniFilePath in these keys, then the first one found will be used as
- the location of the php.ini (Windows only).
+ IniFilePath in any of these keys, the first one found will be used
+ as the location of the php.ini (Windows only).
* [HKEY_LOCAL_MACHINE\SOFTWARE\PHP], value of IniFilePath (Windows
only).
- * Current working directory (except CLI)
+ * Current working directory (except CLI).
* The web server's directory (for SAPI modules), or directory of PHP
- (otherwise in Windows)
+ (otherwise in Windows).
* Windows directory (C:\windows or C:\winnt) (for Windows), or
- --with-config-file-path compile time option
+ --with-config-file-path compile time option.
- If php-SAPI.ini exists (where SAPI is used SAPI, so the filename is
- e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini. SAPI
- name can be determined by php_sapi_name().
+ If php-SAPI.ini exists (where SAPI is the SAPI in use, so, for example,
+ php-cli.ini or php-apache.ini), it is used instead of php.ini. The SAPI
+ name can be determined with php_sapi_name().
Note:
- The Apache web server changes the directory to root at startup
+ The Apache web server changes the directory to root at startup,
causing PHP to attempt to read php.ini from the root filesystem if
it exists.
- The php.ini directives handled by extensions are documented
- respectively on the pages of the extensions themselves. The list of the
- core directives is available in the appendix. Probably not all PHP
- directives are documented in the manual though. For a complete list of
+ The php.ini directives handled by extensions are documented on the
+ respective pages of the extensions themselves. A list of the core
+ directives is available in the appendix. Not all PHP directives are
+ necessarily documented in this manual: for a complete list of
directives available in your PHP version, please read your well
- commented php.ini file. Alternatively, you may find the » the latest
- php.ini from SVN helpful too.
+ commented php.ini file. Alternatively, you may find » the latest
+ php.ini from Git helpful too.
Example #1 php.ini example
; any text on a line after an unquoted semicolon (;) is ignored
@@ -1635,12 +1692,13 @@ Where a configuration setting may be set
CAPTION: Definition of PHP_INI_* modes
- Mode Value Meaning
- PHP_INI_USER 1 Entry can be set in user scripts (like with ini_set())
- or in the Windows registry
- PHP_INI_PERDIR 6 Entry can be set in php.ini, .htaccess or httpd.conf
- PHP_INI_SYSTEM 4 Entry can be set in php.ini or httpd.conf
- PHP_INI_ALL 7 Entry can be set anywhere
+ Mode Meaning
+ PHP_INI_USER Entry can be set in user scripts (like with ini_set()) or
+ in the Windows registry. Since PHP 5.3, entry can be set in .user.ini
+ PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or
+ .user.ini (since PHP 5.3)
+ PHP_INI_SYSTEM Entry can be set in php.ini or httpd.conf
+ PHP_INI_ALL Entry can be set anywhere
__________________________________________________________________
__________________________________________________________________
@@ -1788,13 +1846,9 @@ Installation
each request to play in, further weaknesses are introduced into
PHP's system.
- If you feel you have to use a threaded MPM, look at a FastCGI
+ If you want to use a threaded MPM, look at a FastCGI
configuration where PHP is running in its own memory space.
- And finally, this warning against using a threaded MPM is not as
- strong for Windows systems because most libraries on that
- platform tend to be threadsafe.
-
Unix/Windows: Where should my php.ini file be located?
By default on Unix it should be in /usr/local/lib which is
<install-path>/lib. Most people will want to change this at
diff --git a/NEWS b/NEWS
index 8f5512367a..cd7333cbb2 100644
--- a/NEWS
+++ b/NEWS
@@ -2,17 +2,54 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2012, PHP 5.3.16
+- Core:
+ . Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence)
+ . Fixed bug #62763 (register_shutdown_function and extending class).
+ (Laruence)
+ . Fixed bug #62744 (dangling pointers made by zend_disable_class). (Laruence)
+ . Fixed bug #62716 (munmap() is called with the incorrect length).
+ (slangley@google.com)
+ . Fixed bug ##62460 (php binaries installed as binary.dSYM). (Reeze Xia)
+ . Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
+ with run-test.php). (Laruence)
+
- CURL:
+ . Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick)
. Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
(r.hampartsumyan@gmail.com, Laruence)
- DateTime:
- . Fixed Bug #62500 (Segfault in DateInterval class when extended). (Laruence)
+ . Fixed bug #62852 (Unserialize invalid DateTime causes crash).
+ (reeze.xia@gmail.com)
+ . Fixed bug #62500 (Segfault in DateInterval class when extended). (Laruence)
+
+- Intl:
+ . Fix null pointer dereferences in some classes of ext/intl. (Gustavo)
+ . Fix bug #62915 (defective cloning in several intl classes). (Gustavo)
+
+- MySQLnd:
+ . Fixed bug #62885 (mysqli_poll - Segmentation fault). (Laruence)
+
+- PDO:
+ . Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence)
+
+- Reflection:
+ . Fixed bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong
+ result). (Laruence)
+
+- Session:
+ . Fixed bug (segfault due to retval is not initialized). (Laruence)
- SPL:
+ . Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray)
+ (Laruence)
. Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
gives Segmentation fault). (Laruence, Gustavo)
+- Enchant:
+ . Fixed bug #62838 (enchant_dict_quick_check() destroys zval, but fails to
+ initialize it). (Tony, Mateusz Goik).
+
19 Jul 2012, PHP 5.3.15
- Zend Engine:
diff --git a/Zend/tests/bug55509.phpt b/Zend/tests/bug55509.phpt
index b78fceb0da..5268789df6 100644
--- a/Zend/tests/bug55509.phpt
+++ b/Zend/tests/bug55509.phpt
@@ -5,6 +5,12 @@ Bug #55509 (segfault on x86_64 using more than 2G memory)
if (PHP_INT_SIZE == 4) {
die('skip Not for 32-bits OS');
}
+
+$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
+if ($zend_mm_enabled === "0") {
+ die("skip Zend MM disabled");
+}
+
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
// check the available memory
if (PHP_OS == 'Linux') {
diff --git a/Zend/tests/bug62680.phpt b/Zend/tests/bug62680.phpt
new file mode 100644
index 0000000000..804dece415
--- /dev/null
+++ b/Zend/tests/bug62680.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #62680 (Function isset() throws fatal error on set array if non-existent key depth >= 3)
+--XFAIL--
+see https://bugs.php.net/62680
+--FILE--
+<?php
+$array = array("");
+var_dump(isset($array[0]["a"]["b"]));
+var_dump(isset($array[0]["a"]["b"]["c"]));
+?>
+--EXPECT--
+bool(false)
+bool(false)
diff --git a/Zend/tests/bug62763.phpt b/Zend/tests/bug62763.phpt
new file mode 100644
index 0000000000..50c27bdf35
--- /dev/null
+++ b/Zend/tests/bug62763.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #62763 (register_shutdown_function and extending class)
+--FILE--
+<?php
+class test1 {
+ public function __construct() {
+ register_shutdown_function(array($this, 'shutdown'));
+ }
+ public function shutdown() {
+ exit(__METHOD__);
+ }
+}
+
+class test2 extends test1 {
+ public function __destruct() {
+ exit (__METHOD__);
+ }
+}
+new test1;
+new test2;
+?>
+--EXPECT--
+test1::shutdowntest2::__destruct
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 6d2ccd2c69..70cf0c7af8 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2342,16 +2342,15 @@ static const zend_function_entry disabled_class_new[] = {
ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_DC) /* {{{ */
{
- zend_class_entry disabled_class;
+ zend_class_entry **disabled_class;
zend_str_tolower(class_name, class_name_length);
- if (zend_hash_del(CG(class_table), class_name, class_name_length+1)==FAILURE) {
+ if (zend_hash_find(CG(class_table), class_name, class_name_length+1, (void **)&disabled_class)==FAILURE) {
return FAILURE;
}
- INIT_OVERLOADED_CLASS_ENTRY_EX(disabled_class, class_name, class_name_length, disabled_class_new, NULL, NULL, NULL, NULL, NULL);
- disabled_class.create_object = display_disabled_class;
- disabled_class.name_length = class_name_length;
- zend_register_internal_class(&disabled_class TSRMLS_CC);
+ INIT_CLASS_ENTRY_INIT_METHODS((**disabled_class), disabled_class_new, NULL, NULL, NULL, NULL, NULL);
+ (*disabled_class)->create_object = display_disabled_class;
+ zend_hash_clean(&((*disabled_class)->function_table));
return SUCCESS;
}
/* }}} */
@@ -2425,7 +2424,6 @@ static int zend_is_callable_check_class(const char *name, int name_len, zend_fca
}
/* }}} */
-
static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fcall_info_cache *fcc, int strict_class, char **error TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce_org = fcc->calling_scope;
@@ -2447,11 +2445,9 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
/* Skip leading \ */
if (Z_STRVAL_P(callable)[0] == '\\') {
mlen = Z_STRLEN_P(callable) - 1;
- mname = Z_STRVAL_P(callable) + 1;
lmname = zend_str_tolower_dup(Z_STRVAL_P(callable) + 1, mlen);
} else {
mlen = Z_STRLEN_P(callable);
- mname = Z_STRVAL_P(callable);
lmname = zend_str_tolower_dup(Z_STRVAL_P(callable), mlen);
}
/* Check if function with given name exists.
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 0a2a595557..ddd84fa584 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -170,6 +170,11 @@ typedef struct _zend_fcall_info_cache {
int _len = class_name_len; \
class_container.name = zend_strndup(class_name, _len); \
class_container.name_length = _len; \
+ INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
+ }
+
+#define INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
+ { \
class_container.builtin_functions = functions; \
class_container.constructor = NULL; \
class_container.destructor = NULL; \
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 1d0ada7a64..15a48fad8c 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Feb 15 17:38:31 2012 */
+/* Generated by re2c 0.13.5 on Sat Jul 28 16:59:07 2012 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
@@ -287,7 +287,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
zend_multibyte_set_filter(NULL TSRMLS_CC);
if (!SCNG(input_filter)) {
- SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+1);
+ SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+2);
memcpy(SCNG(script_filtered), SCNG(script_org), SCNG(script_org_size)+1);
SCNG(script_filtered_size) = SCNG(script_org_size);
} else {
@@ -445,7 +445,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
zend_multibyte_set_filter(CG(internal_encoding) TSRMLS_CC);
if (!SCNG(input_filter)) {
- SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+1);
+ SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+2);
memcpy(SCNG(script_filtered), SCNG(script_org), SCNG(script_org_size)+1);
SCNG(script_filtered_size) = SCNG(script_org_size);
} else {
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 9b2e453dd6..c92bf2b107 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -285,7 +285,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
zend_multibyte_set_filter(NULL TSRMLS_CC);
if (!SCNG(input_filter)) {
- SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+1);
+ SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+2);
memcpy(SCNG(script_filtered), SCNG(script_org), SCNG(script_org_size)+1);
SCNG(script_filtered_size) = SCNG(script_org_size);
} else {
@@ -443,7 +443,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
zend_multibyte_set_filter(CG(internal_encoding) TSRMLS_CC);
if (!SCNG(input_filter)) {
- SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+1);
+ SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+2);
memcpy(SCNG(script_filtered), SCNG(script_org), SCNG(script_org_size)+1);
SCNG(script_filtered_size) = SCNG(script_org_size);
} else {
diff --git a/Zend/zend_language_scanner_defs.h b/Zend/zend_language_scanner_defs.h
index adaedcf1aa..02a2a39500 100644
--- a/Zend/zend_language_scanner_defs.h
+++ b/Zend/zend_language_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Feb 15 17:38:31 2012 */
+/* Generated by re2c 0.13.5 on Sat Jul 28 16:59:07 2012 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c
index 5a02ecdfae..bc5206c12c 100644
--- a/Zend/zend_stream.c
+++ b/Zend/zend_stream.c
@@ -79,7 +79,7 @@ static size_t zend_stream_stdio_fsizer(void *handle TSRMLS_DC) /* {{{ */
static void zend_stream_unmap(zend_stream *stream TSRMLS_DC) { /* {{{ */
#if HAVE_MMAP
if (stream->mmap.map) {
- munmap(stream->mmap.map, stream->mmap.len);
+ munmap(stream->mmap.map, stream->mmap.len + ZEND_MMAP_AHEAD);
} else
#endif
if (stream->mmap.buf) {
diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl
index 18d0e29356..e5a143eaa7 100644
--- a/Zend/zend_vm_execute.skl
+++ b/Zend/zend_vm_execute.skl
@@ -4,8 +4,8 @@ ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array TSRMLS_DC)
{
zend_execute_data *execute_data;
zend_bool nested = 0;
- zend_bool original_in_execution = EG(in_execution);
{%HELPER_VARS%}
+ {%EXECUTION_STATUS%}
{%INTERNAL_LABELS%}
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index 86d6503592..2fff1a9c52 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -850,6 +850,13 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
skip_blanks($f, $m[1], $m[3]."\n");
}
break;
+ case "EXECUTION_STATUS":
+ if ($kind != ZEND_VM_KIND_GOTO) {
+ out($f, $m[1] . "zend_bool original_in_execution = EG(in_execution);\n");
+ } else {
+ out($f, $m[1] . "zend_bool original_in_execution = op_array? EG(in_execution) : 0;\n");
+ }
+ break;
case "INTERNAL_LABELS":
if ($kind == ZEND_VM_KIND_GOTO) {
// Emit array of labels of opcode handlers and code for
diff --git a/configure.in b/configure.in
index fa6c55769e..d896583313 100644
--- a/configure.in
+++ b/configure.in
@@ -1335,10 +1335,10 @@ PHP_CONFIGURE_PART(Configuring libtool)
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
-dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
+dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5, 10.6, 10.7 and 10.8.
dnl This hack works around it. Ugly.
case $host_alias in
-*darwin9*|*darwin10*)
+*darwin9*|*darwin10*|*darwin11*|*darwin12*)
ac_cv_exeext=
;;
esac
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 94be60fd5d..7b72873038 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -1610,9 +1610,9 @@ PHP_FUNCTION(curl_copy_handle)
dupch->uses = 0;
ch->uses++;
if (ch->handlers->write->stream) {
- Z_ADDREF_P(dupch->handlers->write->stream);
- dupch->handlers->write->stream = ch->handlers->write->stream;
+ Z_ADDREF_P(ch->handlers->write->stream);
}
+ dupch->handlers->write->stream = ch->handlers->write->stream;
dupch->handlers->write->method = ch->handlers->write->method;
dupch->handlers->write->type = ch->handlers->write->type;
if (ch->handlers->read->stream) {
diff --git a/ext/curl/tests/bug62839.phpt b/ext/curl/tests/bug62839.phpt
new file mode 100644
index 0000000000..39e6fc9cbe
--- /dev/null
+++ b/ext/curl/tests/bug62839.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #62839 (curl_copy_handle segfault with CURLOPT_FILE)
+--SKIPIF--
+<?php if (!extension_loaded("curl")) print "skip";
+?>
+--FILE--
+<?php
+$curl = curl_init();
+
+$fd = fopen('/tmp/test', 'wb');
+curl_setopt($curl, CURLOPT_FILE, $fd);
+
+curl_copy_handle($curl);
+
+echo 'DONE!';
+?>
+--EXPECTF--
+DONE!
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index e8a457052e..d9e6a289b4 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2544,6 +2544,9 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS) {
convert_to_long(*z_timezone_type);
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) {
+ zend_error_handling error_handling;
+
+ zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
convert_to_string(*z_timezone);
switch (Z_LVAL_PP(z_timezone_type)) {
@@ -2551,9 +2554,9 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
case TIMELIB_ZONETYPE_ABBR: {
char *tmp = emalloc(Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2);
snprintf(tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2, "%s %s", Z_STRVAL_PP(z_date), Z_STRVAL_PP(z_timezone));
- php_date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 0 TSRMLS_CC);
+ php_date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 1 TSRMLS_CC);
efree(tmp);
- return 1;
+ break;
}
case TIMELIB_ZONETYPE_ID:
@@ -2567,10 +2570,15 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
tzobj->tzi.tz = tzi;
tzobj->initialized = 1;
- php_date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 0 TSRMLS_CC);
+ php_date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 1 TSRMLS_CC);
zval_ptr_dtor(&tmp_obj);
- return 1;
+ break;
+ default:
+ zend_restore_error_handling(&error_handling TSRMLS_CC);
+ return 0;
}
+ zend_restore_error_handling(&error_handling TSRMLS_CC);
+ return 1;
}
}
}
diff --git a/ext/date/tests/bug62852.phpt b/ext/date/tests/bug62852.phpt
new file mode 100644
index 0000000000..6426a80fb8
--- /dev/null
+++ b/ext/date/tests/bug62852.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #62852 (Unserialize invalid DateTime causes crash)
+--INI--
+date.timezone=GMT
+--FILE--
+<?php
+try {
+ $datetime = unserialize('O:8:"DateTime":3:{s:4:"date";s:20:"10007-06-07 03:51:49";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}');
+ var_dump($datetime);
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+?>
+--EXPECTF--
+string(%d) "DateTime::__wakeup(): Failed to parse time string (%s) at position 12 (0): Double time specification"
diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c
index d61ba796ab..eee3b5f887 100644
--- a/ext/dom/documenttype.c
+++ b/ext/dom/documenttype.c
@@ -205,7 +205,11 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval **retval TSRMLS_
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 0, 0, NULL);
xmlOutputBufferFlush(buff);
+#ifdef LIBXML2_NEW_BUFFER
+ ZVAL_STRINGL(*retval, xmlOutputBufferGetContent(buff), xmlOutputBufferGetSize(buff), 1);
+#else
ZVAL_STRINGL(*retval, buff->buffer->content, buff->buffer->use, 1);
+#endif
(void)xmlOutputBufferClose(buff);
return SUCCESS;
}
diff --git a/ext/dom/element.c b/ext/dom/element.c
index 979274176b..33002fa1ee 100644
--- a/ext/dom/element.c
+++ b/ext/dom/element.c
@@ -832,7 +832,7 @@ PHP_FUNCTION(dom_element_set_attribute_ns)
}
if (errorcode == 0 && is_xmlns == 0) {
- attr = xmlSetNsProp(elemp, nsptr, (xmlChar *)localname, (xmlChar *)value);
+ xmlSetNsProp(elemp, nsptr, (xmlChar *)localname, (xmlChar *)value);
}
} else {
name_valid = xmlValidateName((xmlChar *) localname, 0);
@@ -844,7 +844,7 @@ PHP_FUNCTION(dom_element_set_attribute_ns)
if (attr != NULL && attr->type != XML_ATTRIBUTE_DECL) {
node_list_unlink(attr->children TSRMLS_CC);
}
- attr = xmlSetProp(elemp, (xmlChar *)localname, (xmlChar *)value);
+ xmlSetProp(elemp, (xmlChar *)localname, (xmlChar *)value);
}
}
}
diff --git a/ext/dom/node.c b/ext/dom/node.c
index 5bcb234762..727d1bcef3 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -1895,9 +1895,17 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{
RETVAL_FALSE;
} else {
if (mode == 0) {
+#ifdef LIBXML2_NEW_BUFFER
+ ret = xmlOutputBufferGetSize(buf);
+#else
ret = buf->buffer->use;
+#endif
if (ret > 0) {
+#ifdef LIBXML2_NEW_BUFFER
+ RETVAL_STRINGL((char *) xmlOutputBufferGetContent(buf), ret, 1);
+#else
RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
+#endif
} else {
RETVAL_EMPTY_STRING();
}
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index 0126d9ef4e..dcc39e267b 100755
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
@@ -729,6 +729,7 @@ PHP_FUNCTION(enchant_dict_quick_check)
if (sugg) {
zval_dtor(sugg);
+ array_init(sugg);
}
PHP_ENCHANT_GET_DICT;
@@ -742,8 +743,6 @@ PHP_FUNCTION(enchant_dict_quick_check)
RETURN_FALSE;
}
- array_init(sugg);
-
suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg_st);
memcpy(&n_sugg, &n_sugg_st, sizeof(n_sugg));
if (suggs && n_sugg) {
diff --git a/ext/exif/tests/bug60150.phpt b/ext/exif/tests/bug60150.phpt
index 63cf0a9daf..be01998fd8 100755
--- a/ext/exif/tests/bug60150.phpt
+++ b/ext/exif/tests/bug60150.phpt
@@ -12,7 +12,7 @@ var_dump(exif_read_data($infile));
?>
===DONE===
--EXPECTF--
-Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOri): Illegal pointer offset(x%x + x%x = x%x > x%x) in %s on line %d
+Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOri): Illegal pointer offset(%s) in %s on line %d
Warning: exif_read_data(bug60150.jpg): Error reading from file: got=x%x(=%d) != itemlen-%d=x%x(=%d) in %s on line %d
diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c
index 36c5e392eb..0c82898e43 100644
--- a/ext/fileinfo/fileinfo.c
+++ b/ext/fileinfo/fileinfo.c
@@ -271,7 +271,7 @@ ZEND_GET_MODULE(fileinfo)
PHP_MINFO_FUNCTION(fileinfo)
{
php_info_print_table_start();
- php_info_print_table_header(2, "fileinfo support", "enabled");
+ php_info_print_table_row(2, "fileinfo support", "enabled");
php_info_print_table_row(2, "version", PHP_FILEINFO_VERSION);
php_info_print_table_end();
}
diff --git a/ext/intl/CREDITS b/ext/intl/CREDITS
index 0e7fd55dc1..0e7fd55dc1 100755..100644
--- a/ext/intl/CREDITS
+++ b/ext/intl/CREDITS
diff --git a/ext/intl/TODO b/ext/intl/TODO
index 6fd1b27814..6fd1b27814 100755..100644
--- a/ext/intl/TODO
+++ b/ext/intl/TODO
diff --git a/ext/intl/collator/collator.c b/ext/intl/collator/collator.c
index 047a738028..047a738028 100755..100644
--- a/ext/intl/collator/collator.c
+++ b/ext/intl/collator/collator.c
diff --git a/ext/intl/collator/collator.h b/ext/intl/collator/collator.h
index 96e7aa097b..96e7aa097b 100755..100644
--- a/ext/intl/collator/collator.h
+++ b/ext/intl/collator/collator.h
diff --git a/ext/intl/collator/collator_attr.c b/ext/intl/collator/collator_attr.c
index 684e72cc58..684e72cc58 100755..100644
--- a/ext/intl/collator/collator_attr.c
+++ b/ext/intl/collator/collator_attr.c
diff --git a/ext/intl/collator/collator_attr.h b/ext/intl/collator/collator_attr.h
index 85636cc486..85636cc486 100755..100644
--- a/ext/intl/collator/collator_attr.h
+++ b/ext/intl/collator/collator_attr.h
diff --git a/ext/intl/collator/collator_class.c b/ext/intl/collator/collator_class.c
index 38b2e978ce..38b2e978ce 100755..100644
--- a/ext/intl/collator/collator_class.c
+++ b/ext/intl/collator/collator_class.c
diff --git a/ext/intl/collator/collator_class.h b/ext/intl/collator/collator_class.h
index 835abd66c8..7a56dfce50 100755..100644
--- a/ext/intl/collator/collator_class.h
+++ b/ext/intl/collator/collator_class.h
@@ -20,8 +20,9 @@
#include <php.h>
-#include "intl_common.h"
-#include "intl_error.h"
+#include "../intl_common.h"
+#include "../intl_error.h"
+#include "../intl_data.h"
#include <unicode/ucol.h>
@@ -54,9 +55,7 @@ extern zend_class_entry *Collator_ce_ptr;
Collator_object* co = NULL; \
intl_error_reset( NULL TSRMLS_CC ); \
-#define COLLATOR_METHOD_FETCH_OBJECT \
- co = (Collator_object *) zend_object_store_get_object( object TSRMLS_CC ); \
- intl_error_reset( COLLATOR_ERROR_P( co ) TSRMLS_CC ); \
+#define COLLATOR_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(Collator, co)
// Macro to check return value of a ucol_* function call.
#define COLLATOR_CHECK_STATUS( co, msg ) \
diff --git a/ext/intl/collator/collator_compare.c b/ext/intl/collator/collator_compare.c
index 4384558ac6..4384558ac6 100755..100644
--- a/ext/intl/collator/collator_compare.c
+++ b/ext/intl/collator/collator_compare.c
diff --git a/ext/intl/collator/collator_compare.h b/ext/intl/collator/collator_compare.h
index 4e38b79309..4e38b79309 100755..100644
--- a/ext/intl/collator/collator_compare.h
+++ b/ext/intl/collator/collator_compare.h
diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c
index e989d4c65a..e989d4c65a 100755..100644
--- a/ext/intl/collator/collator_convert.c
+++ b/ext/intl/collator/collator_convert.c
diff --git a/ext/intl/collator/collator_convert.h b/ext/intl/collator/collator_convert.h
index 8322ea998b..8322ea998b 100755..100644
--- a/ext/intl/collator/collator_convert.h
+++ b/ext/intl/collator/collator_convert.h
diff --git a/ext/intl/collator/collator_create.c b/ext/intl/collator/collator_create.c
index 0f0cc193e4..b2a9968af4 100755..100644
--- a/ext/intl/collator/collator_create.c
+++ b/ext/intl/collator/collator_create.c
@@ -45,7 +45,7 @@ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS)
}
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
- co = (Collator_object *) zend_object_store_get_object( object TSRMLS_CC );
+ COLLATOR_METHOD_FETCH_OBJECT;
if(locale_len == 0) {
locale = INTL_G(default_locale);
diff --git a/ext/intl/collator/collator_create.h b/ext/intl/collator/collator_create.h
index b740e82d68..b740e82d68 100755..100644
--- a/ext/intl/collator/collator_create.h
+++ b/ext/intl/collator/collator_create.h
diff --git a/ext/intl/collator/collator_error.c b/ext/intl/collator/collator_error.c
index c4e41250a2..c4e41250a2 100755..100644
--- a/ext/intl/collator/collator_error.c
+++ b/ext/intl/collator/collator_error.c
diff --git a/ext/intl/collator/collator_error.h b/ext/intl/collator/collator_error.h
index b2f44ea2a3..b2f44ea2a3 100755..100644
--- a/ext/intl/collator/collator_error.h
+++ b/ext/intl/collator/collator_error.h
diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c
index a8abfac12b..a8abfac12b 100755..100644
--- a/ext/intl/collator/collator_is_numeric.c
+++ b/ext/intl/collator/collator_is_numeric.c
diff --git a/ext/intl/collator/collator_is_numeric.h b/ext/intl/collator/collator_is_numeric.h
index 585d58917a..585d58917a 100755..100644
--- a/ext/intl/collator/collator_is_numeric.h
+++ b/ext/intl/collator/collator_is_numeric.h
diff --git a/ext/intl/collator/collator_locale.c b/ext/intl/collator/collator_locale.c
index b30b021ee8..b30b021ee8 100755..100644
--- a/ext/intl/collator/collator_locale.c
+++ b/ext/intl/collator/collator_locale.c
diff --git a/ext/intl/collator/collator_locale.h b/ext/intl/collator/collator_locale.h
index bda90cd3b9..bda90cd3b9 100755..100644
--- a/ext/intl/collator/collator_locale.h
+++ b/ext/intl/collator/collator_locale.h
diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c
index 0785111c96..0785111c96 100755..100644
--- a/ext/intl/collator/collator_sort.c
+++ b/ext/intl/collator/collator_sort.c
diff --git a/ext/intl/collator/collator_sort.h b/ext/intl/collator/collator_sort.h
index a990cdf089..a990cdf089 100755..100644
--- a/ext/intl/collator/collator_sort.h
+++ b/ext/intl/collator/collator_sort.h
diff --git a/ext/intl/common/common_error.c b/ext/intl/common/common_error.c
index 3ab7fdfbdd..3ab7fdfbdd 100755..100644
--- a/ext/intl/common/common_error.c
+++ b/ext/intl/common/common_error.c
diff --git a/ext/intl/common/common_error.h b/ext/intl/common/common_error.h
index 8716222124..8716222124 100755..100644
--- a/ext/intl/common/common_error.h
+++ b/ext/intl/common/common_error.h
diff --git a/ext/intl/config.m4 b/ext/intl/config.m4
index dc235db08c..dc235db08c 100755..100644
--- a/ext/intl/config.m4
+++ b/ext/intl/config.m4
diff --git a/ext/intl/config.w32 b/ext/intl/config.w32
index 68ccadf2d8..68ccadf2d8 100755..100644
--- a/ext/intl/config.w32
+++ b/ext/intl/config.w32
diff --git a/ext/intl/dateformat/dateformat.c b/ext/intl/dateformat/dateformat.c
index b399a39fcb..8aded18bd6 100755..100644
--- a/ext/intl/dateformat/dateformat.c
+++ b/ext/intl/dateformat/dateformat.c
@@ -108,7 +108,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
goto error;
}
- DATE_FORMAT_METHOD_FETCH_OBJECT;
+ DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
if (DATE_FORMAT_OBJECT(dfo) != NULL) {
intl_errors_set(INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR,
diff --git a/ext/intl/dateformat/dateformat.h b/ext/intl/dateformat/dateformat.h
index f11918b79f..f11918b79f 100755..100644
--- a/ext/intl/dateformat/dateformat.h
+++ b/ext/intl/dateformat/dateformat.h
diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c
index 6131cedc95..b8c5f25e3a 100755..100644
--- a/ext/intl/dateformat/dateformat_attr.c
+++ b/ext/intl/dateformat/dateformat_attr.c
@@ -17,8 +17,9 @@
#include "config.h"
#endif
-#include "php_intl.h"
-#include "intl_convert.h"
+#include "../php_intl.h"
+#include "dateformat_class.h"
+#include "../intl_convert.h"
#include "dateformat_class.h"
#include "dateformat_attr.h"
diff --git a/ext/intl/dateformat/dateformat_attr.h b/ext/intl/dateformat/dateformat_attr.h
index bf28824d63..bf28824d63 100755..100644
--- a/ext/intl/dateformat/dateformat_attr.h
+++ b/ext/intl/dateformat/dateformat_attr.h
diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c
index eb3f5f4e77..a7227ef03d 100755..100644
--- a/ext/intl/dateformat/dateformat_class.c
+++ b/ext/intl/dateformat/dateformat_class.c
@@ -23,6 +23,8 @@
#include "dateformat.h"
#include "dateformat_attr.h"
+#include <zend_exceptions.h>
+
zend_class_entry *IntlDateFormatter_ce_ptr = NULL;
static zend_object_handlers IntlDateFormatter_handlers;
@@ -87,18 +89,23 @@ zend_object_value IntlDateFormatter_object_clone(zval *object TSRMLS_DC)
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
IntlDateFormatter_object *dfo, *new_dfo;
- DATE_FORMAT_METHOD_FETCH_OBJECT;
- new_obj_val = IntlDateFormatter_ce_ptr->create_object(IntlDateFormatter_ce_ptr TSRMLS_CC);
+ DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
+
+ new_obj_val = IntlDateFormatter_ce_ptr->create_object(Z_OBJCE_P(object) TSRMLS_CC);
new_dfo = (IntlDateFormatter_object *)zend_object_store_get_object_by_handle(new_obj_val.handle TSRMLS_CC);
/* clone standard parts */
zend_objects_clone_members(&new_dfo->zo, new_obj_val, &dfo->zo, handle TSRMLS_CC);
/* clone formatter object */
- DATE_FORMAT_OBJECT(new_dfo) = udat_clone(DATE_FORMAT_OBJECT(dfo), &INTL_DATA_ERROR_CODE(new_dfo));
- if(U_FAILURE(INTL_DATA_ERROR_CODE(new_dfo))) {
- /* set up error in case error handler is interested */
- intl_error_set( NULL, INTL_DATA_ERROR_CODE(new_dfo), "Failed to clone IntlDateFormatter object", 0 TSRMLS_CC );
- IntlDateFormatter_object_dtor(new_dfo, new_obj_val.handle TSRMLS_CC); /* free new object */
- zend_error(E_ERROR, "Failed to clone IntlDateFormatter object");
+ if (dfo->datef_data.udatf != NULL) {
+ DATE_FORMAT_OBJECT(new_dfo) = udat_clone(DATE_FORMAT_OBJECT(dfo), &INTL_DATA_ERROR_CODE(dfo));
+ if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
+ /* set up error in case error handler is interested */
+ intl_errors_set(INTL_DATA_ERROR_P(dfo), INTL_DATA_ERROR_CODE(dfo),
+ "Failed to clone IntlDateFormatter object", 0 TSRMLS_CC );
+ zend_throw_exception(NULL, "Failed to clone IntlDateFormatter object", 0 TSRMLS_CC);
+ }
+ } else {
+ zend_throw_exception(NULL, "Cannot clone unconstructed IntlDateFormatter", 0 TSRMLS_CC);
}
return new_obj_val;
}
diff --git a/ext/intl/dateformat/dateformat_class.h b/ext/intl/dateformat/dateformat_class.h
index 9ad83ee3d6..d58abe42f5 100755..100644
--- a/ext/intl/dateformat/dateformat_class.h
+++ b/ext/intl/dateformat/dateformat_class.h
@@ -38,7 +38,15 @@ extern zend_class_entry *IntlDateFormatter_ce_ptr;
/* Auxiliary macros */
#define DATE_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(IntlDateFormatter, dfo)
-#define DATE_FORMAT_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(IntlDateFormatter, dfo)
+#define DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(IntlDateFormatter, dfo)
+#define DATE_FORMAT_METHOD_FETCH_OBJECT \
+ DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK; \
+ if (dfo->datef_data.udatf == NULL) \
+ { \
+ intl_errors_set(&dfo->datef_data.error, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlDateFormatter", 0 TSRMLS_CC); \
+ RETURN_FALSE; \
+ }
+
#define DATE_FORMAT_OBJECT(dfo) (dfo)->datef_data.udatf
#endif // #ifndef DATE_FORMAT_CLASS_H
diff --git a/ext/intl/dateformat/dateformat_data.c b/ext/intl/dateformat/dateformat_data.c
index 33451e1c51..33451e1c51 100755..100644
--- a/ext/intl/dateformat/dateformat_data.c
+++ b/ext/intl/dateformat/dateformat_data.c
diff --git a/ext/intl/dateformat/dateformat_data.h b/ext/intl/dateformat/dateformat_data.h
index cde9e363c9..cde9e363c9 100755..100644
--- a/ext/intl/dateformat/dateformat_data.h
+++ b/ext/intl/dateformat/dateformat_data.h
diff --git a/ext/intl/dateformat/dateformat_format.c b/ext/intl/dateformat/dateformat_format.c
index 4d03d924c8..4d03d924c8 100755..100644
--- a/ext/intl/dateformat/dateformat_format.c
+++ b/ext/intl/dateformat/dateformat_format.c
diff --git a/ext/intl/dateformat/dateformat_format.h b/ext/intl/dateformat/dateformat_format.h
index 49f34c6892..49f34c6892 100755..100644
--- a/ext/intl/dateformat/dateformat_format.h
+++ b/ext/intl/dateformat/dateformat_format.h
diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c
index 4193e89017..4193e89017 100755..100644
--- a/ext/intl/dateformat/dateformat_parse.c
+++ b/ext/intl/dateformat/dateformat_parse.c
diff --git a/ext/intl/dateformat/dateformat_parse.h b/ext/intl/dateformat/dateformat_parse.h
index c74a3d5f15..c74a3d5f15 100755..100644
--- a/ext/intl/dateformat/dateformat_parse.h
+++ b/ext/intl/dateformat/dateformat_parse.h
diff --git a/ext/intl/doc/Tutorial.txt b/ext/intl/doc/Tutorial.txt
index 4a66dc1844..4a66dc1844 100755..100644
--- a/ext/intl/doc/Tutorial.txt
+++ b/ext/intl/doc/Tutorial.txt
diff --git a/ext/intl/doc/collator_api.php b/ext/intl/doc/collator_api.php
index 5428783750..5428783750 100755..100644
--- a/ext/intl/doc/collator_api.php
+++ b/ext/intl/doc/collator_api.php
diff --git a/ext/intl/doc/common_api.php b/ext/intl/doc/common_api.php
index ce2329fe3b..ce2329fe3b 100755..100644
--- a/ext/intl/doc/common_api.php
+++ b/ext/intl/doc/common_api.php
diff --git a/ext/intl/doc/datefmt_api.php b/ext/intl/doc/datefmt_api.php
index 0c5002e281..0c5002e281 100755..100644
--- a/ext/intl/doc/datefmt_api.php
+++ b/ext/intl/doc/datefmt_api.php
diff --git a/ext/intl/doc/formatter_api.php b/ext/intl/doc/formatter_api.php
index 754b16c62f..754b16c62f 100755..100644
--- a/ext/intl/doc/formatter_api.php
+++ b/ext/intl/doc/formatter_api.php
diff --git a/ext/intl/doc/grapheme_api.php b/ext/intl/doc/grapheme_api.php
index 465453fd32..465453fd32 100755..100644
--- a/ext/intl/doc/grapheme_api.php
+++ b/ext/intl/doc/grapheme_api.php
diff --git a/ext/intl/doc/locale_api.php b/ext/intl/doc/locale_api.php
index c6c41ede0a..c6c41ede0a 100755..100644
--- a/ext/intl/doc/locale_api.php
+++ b/ext/intl/doc/locale_api.php
diff --git a/ext/intl/doc/msgfmt_api.php b/ext/intl/doc/msgfmt_api.php
index 5d178f1273..5d178f1273 100755..100644
--- a/ext/intl/doc/msgfmt_api.php
+++ b/ext/intl/doc/msgfmt_api.php
diff --git a/ext/intl/doc/normalizer_api.php b/ext/intl/doc/normalizer_api.php
index a9bb566e67..a9bb566e67 100755..100644
--- a/ext/intl/doc/normalizer_api.php
+++ b/ext/intl/doc/normalizer_api.php
diff --git a/ext/intl/formatter/formatter.c b/ext/intl/formatter/formatter.c
index 1b7922ce03..1b7922ce03 100755..100644
--- a/ext/intl/formatter/formatter.c
+++ b/ext/intl/formatter/formatter.c
diff --git a/ext/intl/formatter/formatter.h b/ext/intl/formatter/formatter.h
index 1f9ebead8e..1f9ebead8e 100755..100644
--- a/ext/intl/formatter/formatter.h
+++ b/ext/intl/formatter/formatter.h
diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c
index 448a9db721..448a9db721 100755..100644
--- a/ext/intl/formatter/formatter_attr.c
+++ b/ext/intl/formatter/formatter_attr.c
diff --git a/ext/intl/formatter/formatter_attr.h b/ext/intl/formatter/formatter_attr.h
index c4bc94ce5f..c4bc94ce5f 100755..100644
--- a/ext/intl/formatter/formatter_attr.h
+++ b/ext/intl/formatter/formatter_attr.h
diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c
index 0bb5894f09..9de1e1e96e 100755..100644
--- a/ext/intl/formatter/formatter_class.c
+++ b/ext/intl/formatter/formatter_class.c
@@ -24,6 +24,8 @@
#include "formatter_main.h"
#include "formatter_attr.h"
+#include <zend_exceptions.h>
+
zend_class_entry *NumberFormatter_ce_ptr = NULL;
static zend_object_handlers NumberFormatter_handlers;
@@ -82,18 +84,23 @@ zend_object_value NumberFormatter_object_clone(zval *object TSRMLS_DC)
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
NumberFormatter_object *nfo, *new_nfo;
- FORMATTER_METHOD_FETCH_OBJECT;
- new_obj_val = NumberFormatter_ce_ptr->create_object(NumberFormatter_ce_ptr TSRMLS_CC);
+ FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK;
+ new_obj_val = NumberFormatter_ce_ptr->create_object(Z_OBJCE_P(object) TSRMLS_CC);
new_nfo = (NumberFormatter_object *)zend_object_store_get_object_by_handle(new_obj_val.handle TSRMLS_CC);
/* clone standard parts */
zend_objects_clone_members(&new_nfo->zo, new_obj_val, &nfo->zo, handle TSRMLS_CC);
- /* clone formatter object */
- FORMATTER_OBJECT(new_nfo) = unum_clone(FORMATTER_OBJECT(nfo), &INTL_DATA_ERROR_CODE(new_nfo));
- if(U_FAILURE(INTL_DATA_ERROR_CODE(new_nfo))) {
- /* set up error in case error handler is interested */
- intl_error_set( NULL, INTL_DATA_ERROR_CODE(new_nfo), "Failed to clone NumberFormatter object", 0 TSRMLS_CC );
- NumberFormatter_object_dtor(new_nfo, new_obj_val.handle TSRMLS_CC); /* free new object */
- zend_error(E_ERROR, "Failed to clone NumberFormatter object");
+ /* clone formatter object. It may fail, the destruction code must handle this case */
+ if (FORMATTER_OBJECT(nfo) != NULL) {
+ FORMATTER_OBJECT(new_nfo) = unum_clone(FORMATTER_OBJECT(nfo),
+ &INTL_DATA_ERROR_CODE(nfo));
+ if (U_FAILURE(INTL_DATA_ERROR_CODE(nfo))) {
+ /* set up error in case error handler is interested */
+ intl_errors_set(INTL_DATA_ERROR_P(nfo), INTL_DATA_ERROR_CODE(nfo),
+ "Failed to clone NumberFormatter object", 0 TSRMLS_CC);
+ zend_throw_exception(NULL, "Failed to clone NumberFormatter object", 0 TSRMLS_CC);
+ }
+ } else {
+ zend_throw_exception(NULL, "Cannot clone unconstructed NumberFormatter", 0 TSRMLS_CC);
}
return new_obj_val;
}
diff --git a/ext/intl/formatter/formatter_class.h b/ext/intl/formatter/formatter_class.h
index cf1cb060c6..9582866664 100755..100644
--- a/ext/intl/formatter/formatter_class.h
+++ b/ext/intl/formatter/formatter_class.h
@@ -34,8 +34,17 @@ extern zend_class_entry *NumberFormatter_ce_ptr;
/* Auxiliary macros */
-#define FORMATTER_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(NumberFormatter, nfo)
-#define FORMATTER_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(NumberFormatter, nfo)
-#define FORMATTER_OBJECT(nfo) (nfo)->nf_data.unum
+#define FORMATTER_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(NumberFormatter, nfo)
+#define FORMATTER_OBJECT(nfo) (nfo)->nf_data.unum
+#define FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(NumberFormatter, nfo)
+#define FORMATTER_METHOD_FETCH_OBJECT \
+ FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK; \
+ if (FORMATTER_OBJECT(nfo) == NULL) \
+ { \
+ intl_errors_set(&nfo->nf_data.error, U_ILLEGAL_ARGUMENT_ERROR, \
+ "Found unconstructed NumberFormatter", 0 TSRMLS_CC); \
+ RETURN_FALSE; \
+ }
+
#endif // #ifndef FORMATTER_CLASS_H
diff --git a/ext/intl/formatter/formatter_data.c b/ext/intl/formatter/formatter_data.c
index 88f122f7c9..88f122f7c9 100755..100644
--- a/ext/intl/formatter/formatter_data.c
+++ b/ext/intl/formatter/formatter_data.c
diff --git a/ext/intl/formatter/formatter_data.h b/ext/intl/formatter/formatter_data.h
index adc4818afc..adc4818afc 100755..100644
--- a/ext/intl/formatter/formatter_data.h
+++ b/ext/intl/formatter/formatter_data.h
diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c
index ce1c941e19..ce1c941e19 100755..100644
--- a/ext/intl/formatter/formatter_format.c
+++ b/ext/intl/formatter/formatter_format.c
diff --git a/ext/intl/formatter/formatter_format.h b/ext/intl/formatter/formatter_format.h
index 35fafd1ede..35fafd1ede 100755..100644
--- a/ext/intl/formatter/formatter_format.h
+++ b/ext/intl/formatter/formatter_format.h
diff --git a/ext/intl/formatter/formatter_main.c b/ext/intl/formatter/formatter_main.c
index 8fa17560b8..5cb6483326 100755..100644
--- a/ext/intl/formatter/formatter_main.c
+++ b/ext/intl/formatter/formatter_main.c
@@ -47,7 +47,7 @@ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
object = return_value;
- FORMATTER_METHOD_FETCH_OBJECT;
+ FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK;
/* Convert pattern (if specified) to UTF-16. */
if(pattern && pattern_len) {
diff --git a/ext/intl/formatter/formatter_main.h b/ext/intl/formatter/formatter_main.h
index 7669e684ae..7669e684ae 100755..100644
--- a/ext/intl/formatter/formatter_main.h
+++ b/ext/intl/formatter/formatter_main.h
diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c
index 6f3a3a12b5..6f3a3a12b5 100755..100644
--- a/ext/intl/formatter/formatter_parse.c
+++ b/ext/intl/formatter/formatter_parse.c
diff --git a/ext/intl/formatter/formatter_parse.h b/ext/intl/formatter/formatter_parse.h
index cb96c72b5d..cb96c72b5d 100755..100644
--- a/ext/intl/formatter/formatter_parse.h
+++ b/ext/intl/formatter/formatter_parse.h
diff --git a/ext/intl/grapheme/grapheme.h b/ext/intl/grapheme/grapheme.h
index c0e697ac1e..c0e697ac1e 100755..100644
--- a/ext/intl/grapheme/grapheme.h
+++ b/ext/intl/grapheme/grapheme.h
diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c
index 0b7ecdb27d..0b7ecdb27d 100755..100644
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
diff --git a/ext/intl/grapheme/grapheme_util.c b/ext/intl/grapheme/grapheme_util.c
index 92008554d4..92008554d4 100755..100644
--- a/ext/intl/grapheme/grapheme_util.c
+++ b/ext/intl/grapheme/grapheme_util.c
diff --git a/ext/intl/grapheme/grapheme_util.h b/ext/intl/grapheme/grapheme_util.h
index c91aeaff7d..c91aeaff7d 100755..100644
--- a/ext/intl/grapheme/grapheme_util.h
+++ b/ext/intl/grapheme/grapheme_util.h
diff --git a/ext/intl/intl_common.h b/ext/intl/intl_common.h
index 9424571d02..9424571d02 100755..100644
--- a/ext/intl/intl_common.h
+++ b/ext/intl/intl_common.h
diff --git a/ext/intl/intl_convert.c b/ext/intl/intl_convert.c
index 33f1730625..33f1730625 100755..100644
--- a/ext/intl/intl_convert.c
+++ b/ext/intl/intl_convert.c
diff --git a/ext/intl/intl_convert.h b/ext/intl/intl_convert.h
index 3fc03f4bb7..3fc03f4bb7 100755..100644
--- a/ext/intl/intl_convert.h
+++ b/ext/intl/intl_convert.h
diff --git a/ext/intl/intl_data.h b/ext/intl/intl_data.h
index 66ca27ae79..66ca27ae79 100755..100644
--- a/ext/intl/intl_data.h
+++ b/ext/intl/intl_data.h
diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c
index 9c2e13dfd5..9c2e13dfd5 100755..100644
--- a/ext/intl/intl_error.c
+++ b/ext/intl/intl_error.c
diff --git a/ext/intl/intl_error.h b/ext/intl/intl_error.h
index 3adae85474..3adae85474 100755..100644
--- a/ext/intl/intl_error.h
+++ b/ext/intl/intl_error.h
diff --git a/ext/intl/locale/locale.c b/ext/intl/locale/locale.c
index ffc463f399..ffc463f399 100755..100644
--- a/ext/intl/locale/locale.c
+++ b/ext/intl/locale/locale.c
diff --git a/ext/intl/locale/locale.h b/ext/intl/locale/locale.h
index f3859c7a2a..f3859c7a2a 100755..100644
--- a/ext/intl/locale/locale.h
+++ b/ext/intl/locale/locale.h
diff --git a/ext/intl/locale/locale_class.c b/ext/intl/locale/locale_class.c
index d433bf5839..d433bf5839 100755..100644
--- a/ext/intl/locale/locale_class.c
+++ b/ext/intl/locale/locale_class.c
diff --git a/ext/intl/locale/locale_class.h b/ext/intl/locale/locale_class.h
index cbddccbe17..cbddccbe17 100755..100644
--- a/ext/intl/locale/locale_class.h
+++ b/ext/intl/locale/locale_class.h
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index 1707c69f93..1707c69f93 100755..100644
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
diff --git a/ext/intl/locale/locale_methods.h b/ext/intl/locale/locale_methods.h
index e88fac64b7..e88fac64b7 100755..100644
--- a/ext/intl/locale/locale_methods.h
+++ b/ext/intl/locale/locale_methods.h
diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c
index 0a01204fae..e3fb9425a9 100755..100644
--- a/ext/intl/msgformat/msgformat.c
+++ b/ext/intl/msgformat/msgformat.c
@@ -49,7 +49,7 @@ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
}
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
- MSG_FORMAT_METHOD_FETCH_OBJECT;
+ MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
/* Convert pattern (if specified) to UTF-16. */
if(pattern && pattern_len) {
diff --git a/ext/intl/msgformat/msgformat.h b/ext/intl/msgformat/msgformat.h
index 205c7066fd..205c7066fd 100755..100644
--- a/ext/intl/msgformat/msgformat.h
+++ b/ext/intl/msgformat/msgformat.h
diff --git a/ext/intl/msgformat/msgformat_attr.c b/ext/intl/msgformat/msgformat_attr.c
index ed2dae27d1..ed2dae27d1 100755..100644
--- a/ext/intl/msgformat/msgformat_attr.c
+++ b/ext/intl/msgformat/msgformat_attr.c
diff --git a/ext/intl/msgformat/msgformat_attr.h b/ext/intl/msgformat/msgformat_attr.h
index 898c4451e1..898c4451e1 100755..100644
--- a/ext/intl/msgformat/msgformat_attr.h
+++ b/ext/intl/msgformat/msgformat_attr.h
diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c
index 7ed28df3dc..d6ba9b1c67 100755..100644
--- a/ext/intl/msgformat/msgformat_class.c
+++ b/ext/intl/msgformat/msgformat_class.c
@@ -24,6 +24,8 @@
#include "msgformat.h"
#include "msgformat_attr.h"
+#include <zend_exceptions.h>
+
zend_class_entry *MessageFormatter_ce_ptr = NULL;
static zend_object_handlers MessageFormatter_handlers;
@@ -80,18 +82,24 @@ zend_object_value MessageFormatter_object_clone(zval *object TSRMLS_DC)
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
MessageFormatter_object *mfo, *new_mfo;
- MSG_FORMAT_METHOD_FETCH_OBJECT;
- new_obj_val = MessageFormatter_ce_ptr->create_object(MessageFormatter_ce_ptr TSRMLS_CC);
+ MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
+ new_obj_val = MessageFormatter_ce_ptr->create_object(Z_OBJCE_P(object) TSRMLS_CC);
new_mfo = (MessageFormatter_object *)zend_object_store_get_object_by_handle(new_obj_val.handle TSRMLS_CC);
/* clone standard parts */
zend_objects_clone_members(&new_mfo->zo, new_obj_val, &mfo->zo, handle TSRMLS_CC);
+
/* clone formatter object */
- MSG_FORMAT_OBJECT(new_mfo) = umsg_clone(MSG_FORMAT_OBJECT(mfo), &INTL_DATA_ERROR_CODE(new_mfo));
- if(U_FAILURE(INTL_DATA_ERROR_CODE(new_mfo))) {
- /* set up error in case error handler is interested */
- intl_error_set( NULL, INTL_DATA_ERROR_CODE(new_mfo), "Failed to clone MessageFormatter object", 0 TSRMLS_CC );
- MessageFormatter_object_dtor(new_mfo, new_obj_val.handle TSRMLS_CC); /* free new object */
- zend_error(E_ERROR, "Failed to clone MessageFormatter object");
+ if (MSG_FORMAT_OBJECT(mfo) != NULL) {
+ MSG_FORMAT_OBJECT(new_mfo) = umsg_clone(MSG_FORMAT_OBJECT(mfo),
+ &INTL_DATA_ERROR_CODE(mfo));
+
+ if (U_FAILURE(INTL_DATA_ERROR_CODE(mfo))) {
+ intl_errors_set(INTL_DATA_ERROR_P(mfo), INTL_DATA_ERROR_CODE(mfo),
+ "Failed to clone MessageFormatter object", 0 TSRMLS_CC);
+ zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Failed to clone MessageFormatter object");
+ }
+ } else {
+ zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Cannot clone unconstructed MessageFormatter");
}
return new_obj_val;
}
diff --git a/ext/intl/msgformat/msgformat_class.h b/ext/intl/msgformat/msgformat_class.h
index b6b8e33226..337e04e647 100755..100644
--- a/ext/intl/msgformat/msgformat_class.h
+++ b/ext/intl/msgformat/msgformat_class.h
@@ -37,7 +37,15 @@ extern zend_class_entry *MessageFormatter_ce_ptr;
/* Auxiliary macros */
#define MSG_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(MessageFormatter, mfo)
-#define MSG_FORMAT_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(MessageFormatter, mfo)
+#define MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(MessageFormatter, mfo)
+#define MSG_FORMAT_METHOD_FETCH_OBJECT \
+ MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK; \
+ if (MSG_FORMAT_OBJECT(mfo) == NULL) { \
+ intl_errors_set(&mfo->mf_data.error, U_ILLEGAL_ARGUMENT_ERROR, \
+ "Found unconstructed MessageFormatter", 0 TSRMLS_CC); \
+ RETURN_FALSE; \
+ }
+
#define MSG_FORMAT_OBJECT(mfo) (mfo)->mf_data.umsgf
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM < 48
diff --git a/ext/intl/msgformat/msgformat_data.c b/ext/intl/msgformat/msgformat_data.c
index 527c1d4d17..527c1d4d17 100755..100644
--- a/ext/intl/msgformat/msgformat_data.c
+++ b/ext/intl/msgformat/msgformat_data.c
diff --git a/ext/intl/msgformat/msgformat_data.h b/ext/intl/msgformat/msgformat_data.h
index 6479888f8f..6479888f8f 100755..100644
--- a/ext/intl/msgformat/msgformat_data.h
+++ b/ext/intl/msgformat/msgformat_data.h
diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c
index 9a18ac0a70..9a18ac0a70 100755..100644
--- a/ext/intl/msgformat/msgformat_format.c
+++ b/ext/intl/msgformat/msgformat_format.c
diff --git a/ext/intl/msgformat/msgformat_format.h b/ext/intl/msgformat/msgformat_format.h
index b74deab8ff..b74deab8ff 100755..100644
--- a/ext/intl/msgformat/msgformat_format.h
+++ b/ext/intl/msgformat/msgformat_format.h
diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp
index 1895de2c86..1895de2c86 100755..100644
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
diff --git a/ext/intl/msgformat/msgformat_helpers.h b/ext/intl/msgformat/msgformat_helpers.h
index 30c7e3930f..30c7e3930f 100755..100644
--- a/ext/intl/msgformat/msgformat_helpers.h
+++ b/ext/intl/msgformat/msgformat_helpers.h
diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c
index f540b1d0c4..f540b1d0c4 100755..100644
--- a/ext/intl/msgformat/msgformat_parse.c
+++ b/ext/intl/msgformat/msgformat_parse.c
diff --git a/ext/intl/msgformat/msgformat_parse.h b/ext/intl/msgformat/msgformat_parse.h
index a937235839..a937235839 100755..100644
--- a/ext/intl/msgformat/msgformat_parse.h
+++ b/ext/intl/msgformat/msgformat_parse.h
diff --git a/ext/intl/normalizer/normalizer.c b/ext/intl/normalizer/normalizer.c
index 033b05cd32..033b05cd32 100755..100644
--- a/ext/intl/normalizer/normalizer.c
+++ b/ext/intl/normalizer/normalizer.c
diff --git a/ext/intl/normalizer/normalizer.h b/ext/intl/normalizer/normalizer.h
index eca9abe05a..eca9abe05a 100755..100644
--- a/ext/intl/normalizer/normalizer.h
+++ b/ext/intl/normalizer/normalizer.h
diff --git a/ext/intl/normalizer/normalizer_class.c b/ext/intl/normalizer/normalizer_class.c
index c5adf781ad..c5adf781ad 100755..100644
--- a/ext/intl/normalizer/normalizer_class.c
+++ b/ext/intl/normalizer/normalizer_class.c
diff --git a/ext/intl/normalizer/normalizer_class.h b/ext/intl/normalizer/normalizer_class.h
index 4d3f7d2341..4d3f7d2341 100755..100644
--- a/ext/intl/normalizer/normalizer_class.h
+++ b/ext/intl/normalizer/normalizer_class.h
diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c
index 466ab97e12..466ab97e12 100755..100644
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
diff --git a/ext/intl/normalizer/normalizer_normalize.h b/ext/intl/normalizer/normalizer_normalize.h
index 41c31f7949..41c31f7949 100755..100644
--- a/ext/intl/normalizer/normalizer_normalize.h
+++ b/ext/intl/normalizer/normalizer_normalize.h
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c
index dc6c0fffa3..dc6c0fffa3 100755..100644
--- a/ext/intl/php_intl.c
+++ b/ext/intl/php_intl.c
diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h
index 4ede069e2a..4ede069e2a 100755..100644
--- a/ext/intl/php_intl.h
+++ b/ext/intl/php_intl.h
diff --git a/ext/intl/resourcebundle/TODO b/ext/intl/resourcebundle/TODO
index ace4ceb253..ace4ceb253 100755..100644
--- a/ext/intl/resourcebundle/TODO
+++ b/ext/intl/resourcebundle/TODO
diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c
index d2a29d9b25..9c0459e1a3 100644
--- a/ext/intl/resourcebundle/resourcebundle_class.c
+++ b/ext/intl/resourcebundle/resourcebundle_class.c
@@ -252,7 +252,14 @@ PHP_FUNCTION( resourcebundle_get )
/* {{{ resourcebundle_array_count */
int resourcebundle_array_count(zval *object, long *count TSRMLS_DC)
{
- ResourceBundle_object *rb = (ResourceBundle_object *) zend_object_store_get_object( object TSRMLS_CC);
+ ResourceBundle_object *rb;
+ RESOURCEBUNDLE_METHOD_FETCH_OBJECT_NO_CHECK;
+
+ if (rb->me == NULL) {
+ intl_errors_set(&rb->error, U_ILLEGAL_ARGUMENT_ERROR,
+ "Found unconstructed ResourceBundle", 0 TSRMLS_CC);
+ return 0;
+ }
*count = ures_getSize( rb->me );
diff --git a/ext/intl/resourcebundle/resourcebundle_class.h b/ext/intl/resourcebundle/resourcebundle_class.h
index 4755d723b8..8da3ed9d47 100644
--- a/ext/intl/resourcebundle/resourcebundle_class.h
+++ b/ext/intl/resourcebundle/resourcebundle_class.h
@@ -33,7 +33,16 @@ typedef struct {
} ResourceBundle_object;
#define RESOURCEBUNDLE_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(ResourceBundle, rb)
-#define RESOURCEBUNDLE_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(ResourceBundle, rb)
+#define RESOURCEBUNDLE_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(ResourceBundle, rb)
+#define RESOURCEBUNDLE_METHOD_FETCH_OBJECT \
+ INTL_METHOD_FETCH_OBJECT(ResourceBundle, rb); \
+ if (RESOURCEBUNDLE_OBJECT(rb) == NULL) { \
+ intl_errors_set(&rb->error, U_ILLEGAL_ARGUMENT_ERROR, \
+ "Found unconstructed ResourceBundle", 0 TSRMLS_CC); \
+ RETURN_FALSE; \
+ }
+
+
#define RESOURCEBUNDLE_OBJECT(rb) (rb)->me
void resourcebundle_register_class( TSRMLS_D );
diff --git a/ext/intl/tests/_files/es-bundle.txt b/ext/intl/tests/_files/es-bundle.txt
index 46399a7717..46399a7717 100755..100644
--- a/ext/intl/tests/_files/es-bundle.txt
+++ b/ext/intl/tests/_files/es-bundle.txt
diff --git a/ext/intl/tests/_files/res_index.txt b/ext/intl/tests/_files/res_index.txt
index a39bea58e5..a39bea58e5 100755..100644
--- a/ext/intl/tests/_files/res_index.txt
+++ b/ext/intl/tests/_files/res_index.txt
diff --git a/ext/intl/tests/_files/resourcebundle.txt b/ext/intl/tests/_files/resourcebundle.txt
index 5b081da6cc..5b081da6cc 100755..100644
--- a/ext/intl/tests/_files/resourcebundle.txt
+++ b/ext/intl/tests/_files/resourcebundle.txt
diff --git a/ext/intl/tests/_files/resourcebundle/es.res b/ext/intl/tests/_files/resourcebundle/es.res
index f9d891d6ba..f9d891d6ba 100755..100644
--- a/ext/intl/tests/_files/resourcebundle/es.res
+++ b/ext/intl/tests/_files/resourcebundle/es.res
Binary files differ
diff --git a/ext/intl/tests/_files/resourcebundle/res_index.res b/ext/intl/tests/_files/resourcebundle/res_index.res
index 9dd3df2de3..9dd3df2de3 100755..100644
--- a/ext/intl/tests/_files/resourcebundle/res_index.res
+++ b/ext/intl/tests/_files/resourcebundle/res_index.res
Binary files differ
diff --git a/ext/intl/tests/_files/resourcebundle/root.res b/ext/intl/tests/_files/resourcebundle/root.res
index 62cb48c457..62cb48c457 100755..100644
--- a/ext/intl/tests/_files/resourcebundle/root.res
+++ b/ext/intl/tests/_files/resourcebundle/root.res
Binary files differ
diff --git a/ext/intl/tests/badargs.phpt b/ext/intl/tests/badargs.phpt
index 9232bbf0c1..9232bbf0c1 100755..100644
--- a/ext/intl/tests/badargs.phpt
+++ b/ext/intl/tests/badargs.phpt
diff --git a/ext/intl/tests/bug12887.phpt b/ext/intl/tests/bug12887.phpt
index e2fc194944..e2fc194944 100755..100644
--- a/ext/intl/tests/bug12887.phpt
+++ b/ext/intl/tests/bug12887.phpt
diff --git a/ext/intl/tests/bug14562.phpt b/ext/intl/tests/bug14562.phpt
index 3256268405..3256268405 100755..100644
--- a/ext/intl/tests/bug14562.phpt
+++ b/ext/intl/tests/bug14562.phpt
diff --git a/ext/intl/tests/bug59597_64.phpt b/ext/intl/tests/bug59597_64.phpt
index 4b96bf72e9..eb70995a25 100644
--- a/ext/intl/tests/bug59597_64.phpt
+++ b/ext/intl/tests/bug59597_64.phpt
@@ -15,7 +15,6 @@ $value = $formatter->parse('2147483650', \NumberFormatter::TYPE_INT64);
var_dump($value);
?>
---EXPECTREGEX--
+--EXPECT--
int(2147483647)
int(2147483650)
-
diff --git a/ext/intl/tests/bug62070.phpt b/ext/intl/tests/bug62070.phpt
index a466b05c24..3ab0078d70 100644
--- a/ext/intl/tests/bug62070.phpt
+++ b/ext/intl/tests/bug62070.phpt
@@ -4,6 +4,8 @@ Bug #62070: Collator::getSortKey() returns garbage
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '49') < 0)
+ die('skip ICU >= 49 only');
--FILE--
<?php
$s1 = 'Hello';
diff --git a/ext/intl/tests/bug62915-2.phpt b/ext/intl/tests/bug62915-2.phpt
new file mode 100644
index 0000000000..6bccf38ff9
--- /dev/null
+++ b/ext/intl/tests/bug62915-2.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #62915: cloning of several classes is defective
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+--FILE--
+<?php
+class A extends IntlDateFormatter {
+ static $ARGS = array("en_US" ,IntlDateFormatter::FULL, IntlDateFormatter::FULL,
+ 'America/Los_Angeles', IntlDateFormatter::GREGORIAN);
+}
+class B extends NumberFormatter {
+ static $ARGS = array('de_DE', NumberFormatter::DECIMAL);
+}
+class C extends MessageFormatter {
+ static $ARGS = array("en_US", "foo");
+}
+
+foreach (range('A', 'C') as $subclass) {
+ $rc = new ReflectionClass($subclass);
+ $obj = $rc->newInstanceArgs($subclass::$ARGS);
+ $clone = clone $obj;
+ var_dump(get_class($clone));
+}
+--EXPECT--
+string(1) "A"
+string(1) "B"
+string(1) "C"
diff --git a/ext/intl/tests/collation_customization.phpt b/ext/intl/tests/collation_customization.phpt
index e380380639..e380380639 100755..100644
--- a/ext/intl/tests/collation_customization.phpt
+++ b/ext/intl/tests/collation_customization.phpt
diff --git a/ext/intl/tests/collator_asort.phpt b/ext/intl/tests/collator_asort.phpt
index a614ddc3f8..a614ddc3f8 100755..100644
--- a/ext/intl/tests/collator_asort.phpt
+++ b/ext/intl/tests/collator_asort.phpt
diff --git a/ext/intl/tests/collator_compare.phpt b/ext/intl/tests/collator_compare.phpt
index f10b5708f4..f10b5708f4 100755..100644
--- a/ext/intl/tests/collator_compare.phpt
+++ b/ext/intl/tests/collator_compare.phpt
diff --git a/ext/intl/tests/collator_create.phpt b/ext/intl/tests/collator_create.phpt
index eed8cf1b23..eed8cf1b23 100755..100644
--- a/ext/intl/tests/collator_create.phpt
+++ b/ext/intl/tests/collator_create.phpt
diff --git a/ext/intl/tests/collator_get_error_code.phpt b/ext/intl/tests/collator_get_error_code.phpt
index 45a8e710f4..45a8e710f4 100755..100644
--- a/ext/intl/tests/collator_get_error_code.phpt
+++ b/ext/intl/tests/collator_get_error_code.phpt
diff --git a/ext/intl/tests/collator_get_error_message.phpt b/ext/intl/tests/collator_get_error_message.phpt
index af4b9c3821..af4b9c3821 100755..100644
--- a/ext/intl/tests/collator_get_error_message.phpt
+++ b/ext/intl/tests/collator_get_error_message.phpt
diff --git a/ext/intl/tests/collator_get_locale.phpt b/ext/intl/tests/collator_get_locale.phpt
index 68440f3ee7..68440f3ee7 100755..100644
--- a/ext/intl/tests/collator_get_locale.phpt
+++ b/ext/intl/tests/collator_get_locale.phpt
diff --git a/ext/intl/tests/collator_get_set_attribute.phpt b/ext/intl/tests/collator_get_set_attribute.phpt
index b234790f81..b234790f81 100755..100644
--- a/ext/intl/tests/collator_get_set_attribute.phpt
+++ b/ext/intl/tests/collator_get_set_attribute.phpt
diff --git a/ext/intl/tests/collator_get_set_strength.phpt b/ext/intl/tests/collator_get_set_strength.phpt
index 1f779441fa..1f779441fa 100755..100644
--- a/ext/intl/tests/collator_get_set_strength.phpt
+++ b/ext/intl/tests/collator_get_set_strength.phpt
diff --git a/ext/intl/tests/collator_get_sort_key.phpt b/ext/intl/tests/collator_get_sort_key.phpt
index a9c4d71348..a9c4d71348 100755..100644
--- a/ext/intl/tests/collator_get_sort_key.phpt
+++ b/ext/intl/tests/collator_get_sort_key.phpt
diff --git a/ext/intl/tests/collator_sort.phpt b/ext/intl/tests/collator_sort.phpt
index 5cefe2fd7c..5cefe2fd7c 100755..100644
--- a/ext/intl/tests/collator_sort.phpt
+++ b/ext/intl/tests/collator_sort.phpt
diff --git a/ext/intl/tests/collator_sort_with_sort_keys.phpt b/ext/intl/tests/collator_sort_with_sort_keys.phpt
index 2f489d745c..2f489d745c 100755..100644
--- a/ext/intl/tests/collator_sort_with_sort_keys.phpt
+++ b/ext/intl/tests/collator_sort_with_sort_keys.phpt
diff --git a/ext/intl/tests/dateformat_clone.phpt b/ext/intl/tests/dateformat_clone.phpt
index f060444741..f060444741 100755..100644
--- a/ext/intl/tests/dateformat_clone.phpt
+++ b/ext/intl/tests/dateformat_clone.phpt
diff --git a/ext/intl/tests/dateformat_clone_bad_obj.phpt b/ext/intl/tests/dateformat_clone_bad_obj.phpt
new file mode 100644
index 0000000000..5e12b96ae8
--- /dev/null
+++ b/ext/intl/tests/dateformat_clone_bad_obj.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Cloning unconstructed IntlDateFormatter
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+class A extends IntlDateFormatter {
+ function __construct() {}
+}
+
+$a = new A;
+try {
+ $b = clone $a;
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+--EXPECTF--
+string(%s) "Cannot clone unconstructed IntlDateFormatter"
diff --git a/ext/intl/tests/dateformat_format.phpt b/ext/intl/tests/dateformat_format.phpt
index e5548196d1..e5548196d1 100755..100644
--- a/ext/intl/tests/dateformat_format.phpt
+++ b/ext/intl/tests/dateformat_format.phpt
diff --git a/ext/intl/tests/dateformat_format_parse.phpt b/ext/intl/tests/dateformat_format_parse.phpt
index bd41d715b9..bd41d715b9 100755..100644
--- a/ext/intl/tests/dateformat_format_parse.phpt
+++ b/ext/intl/tests/dateformat_format_parse.phpt
diff --git a/ext/intl/tests/dateformat_get_datetype.phpt b/ext/intl/tests/dateformat_get_datetype.phpt
index 24d03898ea..24d03898ea 100755..100644
--- a/ext/intl/tests/dateformat_get_datetype.phpt
+++ b/ext/intl/tests/dateformat_get_datetype.phpt
diff --git a/ext/intl/tests/dateformat_get_locale.phpt b/ext/intl/tests/dateformat_get_locale.phpt
index 17fcca3551..17fcca3551 100755..100644
--- a/ext/intl/tests/dateformat_get_locale.phpt
+++ b/ext/intl/tests/dateformat_get_locale.phpt
diff --git a/ext/intl/tests/dateformat_get_set_calendar.phpt b/ext/intl/tests/dateformat_get_set_calendar.phpt
index bfd4e578e1..bfd4e578e1 100755..100644
--- a/ext/intl/tests/dateformat_get_set_calendar.phpt
+++ b/ext/intl/tests/dateformat_get_set_calendar.phpt
diff --git a/ext/intl/tests/dateformat_get_set_pattern.phpt b/ext/intl/tests/dateformat_get_set_pattern.phpt
index bd541c1c93..bd541c1c93 100755..100644
--- a/ext/intl/tests/dateformat_get_set_pattern.phpt
+++ b/ext/intl/tests/dateformat_get_set_pattern.phpt
diff --git a/ext/intl/tests/dateformat_get_timetype.phpt b/ext/intl/tests/dateformat_get_timetype.phpt
index 2ddc1172b1..2ddc1172b1 100755..100644
--- a/ext/intl/tests/dateformat_get_timetype.phpt
+++ b/ext/intl/tests/dateformat_get_timetype.phpt
diff --git a/ext/intl/tests/dateformat_get_timezone_id.phpt b/ext/intl/tests/dateformat_get_timezone_id.phpt
index 80cbdbbf0f..80cbdbbf0f 100755..100644
--- a/ext/intl/tests/dateformat_get_timezone_id.phpt
+++ b/ext/intl/tests/dateformat_get_timezone_id.phpt
diff --git a/ext/intl/tests/dateformat_is_set_lenient.phpt b/ext/intl/tests/dateformat_is_set_lenient.phpt
index 8492a2e2a8..8492a2e2a8 100755..100644
--- a/ext/intl/tests/dateformat_is_set_lenient.phpt
+++ b/ext/intl/tests/dateformat_is_set_lenient.phpt
diff --git a/ext/intl/tests/dateformat_localtime.phpt b/ext/intl/tests/dateformat_localtime.phpt
index 79f297db74..79f297db74 100755..100644
--- a/ext/intl/tests/dateformat_localtime.phpt
+++ b/ext/intl/tests/dateformat_localtime.phpt
diff --git a/ext/intl/tests/dateformat_parse.phpt b/ext/intl/tests/dateformat_parse.phpt
index ff59773488..ff59773488 100755..100644
--- a/ext/intl/tests/dateformat_parse.phpt
+++ b/ext/intl/tests/dateformat_parse.phpt
diff --git a/ext/intl/tests/dateformat_parse_localtime_parsepos.phpt b/ext/intl/tests/dateformat_parse_localtime_parsepos.phpt
index 03f99f1d92..03f99f1d92 100755..100644
--- a/ext/intl/tests/dateformat_parse_localtime_parsepos.phpt
+++ b/ext/intl/tests/dateformat_parse_localtime_parsepos.phpt
diff --git a/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt b/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt
index 0f26643163..0f26643163 100755..100644
--- a/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt
+++ b/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt
diff --git a/ext/intl/tests/dateformat_set_timezone_id.phpt b/ext/intl/tests/dateformat_set_timezone_id.phpt
index 72a9230bdf..72a9230bdf 100755..100644
--- a/ext/intl/tests/dateformat_set_timezone_id.phpt
+++ b/ext/intl/tests/dateformat_set_timezone_id.phpt
diff --git a/ext/intl/tests/formatter_clone.phpt b/ext/intl/tests/formatter_clone.phpt
index 4e8d096244..4e8d096244 100755..100644
--- a/ext/intl/tests/formatter_clone.phpt
+++ b/ext/intl/tests/formatter_clone.phpt
diff --git a/ext/intl/tests/formatter_clone_bad_obj.phpt b/ext/intl/tests/formatter_clone_bad_obj.phpt
new file mode 100644
index 0000000000..ef7b28a546
--- /dev/null
+++ b/ext/intl/tests/formatter_clone_bad_obj.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Cloning unconstructed numfmt
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+class A extends NumberFormatter {
+ function __construct() {}
+}
+
+$a = new A;
+try {
+ $b = clone $a;
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+--EXPECTF--
+string(42) "Cannot clone unconstructed NumberFormatter"
diff --git a/ext/intl/tests/formatter_fail.phpt b/ext/intl/tests/formatter_fail.phpt
index 295f011008..295f011008 100755..100644
--- a/ext/intl/tests/formatter_fail.phpt
+++ b/ext/intl/tests/formatter_fail.phpt
diff --git a/ext/intl/tests/formatter_format.phpt b/ext/intl/tests/formatter_format.phpt
index 334ef49567..334ef49567 100755..100644
--- a/ext/intl/tests/formatter_format.phpt
+++ b/ext/intl/tests/formatter_format.phpt
diff --git a/ext/intl/tests/formatter_format_conv.phpt b/ext/intl/tests/formatter_format_conv.phpt
index e1d25ef3d9..e1d25ef3d9 100755..100644
--- a/ext/intl/tests/formatter_format_conv.phpt
+++ b/ext/intl/tests/formatter_format_conv.phpt
diff --git a/ext/intl/tests/formatter_format_currency.phpt b/ext/intl/tests/formatter_format_currency.phpt
index be219a5baa..be219a5baa 100755..100644
--- a/ext/intl/tests/formatter_format_currency.phpt
+++ b/ext/intl/tests/formatter_format_currency.phpt
diff --git a/ext/intl/tests/formatter_get_error.phpt b/ext/intl/tests/formatter_get_error.phpt
index c7b3972709..c7b3972709 100755..100644
--- a/ext/intl/tests/formatter_get_error.phpt
+++ b/ext/intl/tests/formatter_get_error.phpt
diff --git a/ext/intl/tests/formatter_get_locale.phpt b/ext/intl/tests/formatter_get_locale.phpt
index 3d4fb2ae4e..3d4fb2ae4e 100755..100644
--- a/ext/intl/tests/formatter_get_locale.phpt
+++ b/ext/intl/tests/formatter_get_locale.phpt
diff --git a/ext/intl/tests/formatter_get_set_attribute.phpt b/ext/intl/tests/formatter_get_set_attribute.phpt
index 51c7d3658a..51c7d3658a 100755..100644
--- a/ext/intl/tests/formatter_get_set_attribute.phpt
+++ b/ext/intl/tests/formatter_get_set_attribute.phpt
diff --git a/ext/intl/tests/formatter_get_set_pattern.phpt b/ext/intl/tests/formatter_get_set_pattern.phpt
index 0ae5b308b2..0ae5b308b2 100755..100644
--- a/ext/intl/tests/formatter_get_set_pattern.phpt
+++ b/ext/intl/tests/formatter_get_set_pattern.phpt
diff --git a/ext/intl/tests/formatter_get_set_symbol.phpt b/ext/intl/tests/formatter_get_set_symbol.phpt
index 050e8cf9e1..050e8cf9e1 100755..100644
--- a/ext/intl/tests/formatter_get_set_symbol.phpt
+++ b/ext/intl/tests/formatter_get_set_symbol.phpt
diff --git a/ext/intl/tests/formatter_get_set_text_attribute.phpt b/ext/intl/tests/formatter_get_set_text_attribute.phpt
index 539ff52322..539ff52322 100755..100644
--- a/ext/intl/tests/formatter_get_set_text_attribute.phpt
+++ b/ext/intl/tests/formatter_get_set_text_attribute.phpt
diff --git a/ext/intl/tests/formatter_parse.phpt b/ext/intl/tests/formatter_parse.phpt
index 2ab9cce3b6..2ab9cce3b6 100755..100644
--- a/ext/intl/tests/formatter_parse.phpt
+++ b/ext/intl/tests/formatter_parse.phpt
diff --git a/ext/intl/tests/formatter_parse_currency.phpt b/ext/intl/tests/formatter_parse_currency.phpt
index 4ebd1a4174..4ebd1a4174 100755..100644
--- a/ext/intl/tests/formatter_parse_currency.phpt
+++ b/ext/intl/tests/formatter_parse_currency.phpt
diff --git a/ext/intl/tests/grapheme.phpt b/ext/intl/tests/grapheme.phpt
index def9110d0d..def9110d0d 100755..100644
--- a/ext/intl/tests/grapheme.phpt
+++ b/ext/intl/tests/grapheme.phpt
diff --git a/ext/intl/tests/idn.phpt b/ext/intl/tests/idn.phpt
index fde822a560..fde822a560 100755..100644
--- a/ext/intl/tests/idn.phpt
+++ b/ext/intl/tests/idn.phpt
diff --git a/ext/intl/tests/intl_error_name.phpt b/ext/intl/tests/intl_error_name.phpt
index 8f5b2dc198..8f5b2dc198 100755..100644
--- a/ext/intl/tests/intl_error_name.phpt
+++ b/ext/intl/tests/intl_error_name.phpt
diff --git a/ext/intl/tests/intl_get_error_code.phpt b/ext/intl/tests/intl_get_error_code.phpt
index 6cd361ba71..6cd361ba71 100755..100644
--- a/ext/intl/tests/intl_get_error_code.phpt
+++ b/ext/intl/tests/intl_get_error_code.phpt
diff --git a/ext/intl/tests/intl_get_error_message.phpt b/ext/intl/tests/intl_get_error_message.phpt
index f81b5c03d5..f81b5c03d5 100755..100644
--- a/ext/intl/tests/intl_get_error_message.phpt
+++ b/ext/intl/tests/intl_get_error_message.phpt
diff --git a/ext/intl/tests/intl_is_failure.phpt b/ext/intl/tests/intl_is_failure.phpt
index e07df8f2c9..e07df8f2c9 100755..100644
--- a/ext/intl/tests/intl_is_failure.phpt
+++ b/ext/intl/tests/intl_is_failure.phpt
diff --git a/ext/intl/tests/locale_accept.phpt b/ext/intl/tests/locale_accept.phpt
index 923571f8f0..923571f8f0 100755..100644
--- a/ext/intl/tests/locale_accept.phpt
+++ b/ext/intl/tests/locale_accept.phpt
diff --git a/ext/intl/tests/locale_compose_locale.phpt b/ext/intl/tests/locale_compose_locale.phpt
index 2d0ca54e74..2d0ca54e74 100755..100644
--- a/ext/intl/tests/locale_compose_locale.phpt
+++ b/ext/intl/tests/locale_compose_locale.phpt
diff --git a/ext/intl/tests/locale_filter_matches.phpt b/ext/intl/tests/locale_filter_matches.phpt
index cada499b9a..cada499b9a 100755..100644
--- a/ext/intl/tests/locale_filter_matches.phpt
+++ b/ext/intl/tests/locale_filter_matches.phpt
diff --git a/ext/intl/tests/locale_get_all_variants.phpt b/ext/intl/tests/locale_get_all_variants.phpt
index 864b8a2e1a..864b8a2e1a 100755..100644
--- a/ext/intl/tests/locale_get_all_variants.phpt
+++ b/ext/intl/tests/locale_get_all_variants.phpt
diff --git a/ext/intl/tests/locale_get_default.phpt b/ext/intl/tests/locale_get_default.phpt
index 57c46ccd2b..57c46ccd2b 100755..100644
--- a/ext/intl/tests/locale_get_default.phpt
+++ b/ext/intl/tests/locale_get_default.phpt
diff --git a/ext/intl/tests/locale_get_display_language.phpt b/ext/intl/tests/locale_get_display_language.phpt
index 2e00056284..2e00056284 100755..100644
--- a/ext/intl/tests/locale_get_display_language.phpt
+++ b/ext/intl/tests/locale_get_display_language.phpt
diff --git a/ext/intl/tests/locale_get_display_name.phpt b/ext/intl/tests/locale_get_display_name.phpt
index b128734277..b128734277 100755..100644
--- a/ext/intl/tests/locale_get_display_name.phpt
+++ b/ext/intl/tests/locale_get_display_name.phpt
diff --git a/ext/intl/tests/locale_get_display_region.phpt b/ext/intl/tests/locale_get_display_region.phpt
index 9a6e75d94a..9a6e75d94a 100755..100644
--- a/ext/intl/tests/locale_get_display_region.phpt
+++ b/ext/intl/tests/locale_get_display_region.phpt
diff --git a/ext/intl/tests/locale_get_display_script.phpt b/ext/intl/tests/locale_get_display_script.phpt
index 0440dfb204..0440dfb204 100755..100644
--- a/ext/intl/tests/locale_get_display_script.phpt
+++ b/ext/intl/tests/locale_get_display_script.phpt
diff --git a/ext/intl/tests/locale_get_display_variant.phpt b/ext/intl/tests/locale_get_display_variant.phpt
index 9f72ee0498..9f72ee0498 100755..100644
--- a/ext/intl/tests/locale_get_display_variant.phpt
+++ b/ext/intl/tests/locale_get_display_variant.phpt
diff --git a/ext/intl/tests/locale_get_keywords.phpt b/ext/intl/tests/locale_get_keywords.phpt
index 4a09f54d36..4a09f54d36 100755..100644
--- a/ext/intl/tests/locale_get_keywords.phpt
+++ b/ext/intl/tests/locale_get_keywords.phpt
diff --git a/ext/intl/tests/locale_get_primary_language.phpt b/ext/intl/tests/locale_get_primary_language.phpt
index bc92e9266c..bc92e9266c 100755..100644
--- a/ext/intl/tests/locale_get_primary_language.phpt
+++ b/ext/intl/tests/locale_get_primary_language.phpt
diff --git a/ext/intl/tests/locale_get_region.phpt b/ext/intl/tests/locale_get_region.phpt
index 0baae49932..0baae49932 100755..100644
--- a/ext/intl/tests/locale_get_region.phpt
+++ b/ext/intl/tests/locale_get_region.phpt
diff --git a/ext/intl/tests/locale_get_script.phpt b/ext/intl/tests/locale_get_script.phpt
index 6a794fdb12..6a794fdb12 100755..100644
--- a/ext/intl/tests/locale_get_script.phpt
+++ b/ext/intl/tests/locale_get_script.phpt
diff --git a/ext/intl/tests/locale_lookup.phpt b/ext/intl/tests/locale_lookup.phpt
index f0affafa6f..f0affafa6f 100755..100644
--- a/ext/intl/tests/locale_lookup.phpt
+++ b/ext/intl/tests/locale_lookup.phpt
diff --git a/ext/intl/tests/locale_parse_locale.phpt b/ext/intl/tests/locale_parse_locale.phpt
index c8aa2f4123..c8aa2f4123 100755..100644
--- a/ext/intl/tests/locale_parse_locale.phpt
+++ b/ext/intl/tests/locale_parse_locale.phpt
diff --git a/ext/intl/tests/locale_set_default.phpt b/ext/intl/tests/locale_set_default.phpt
index 7debf4d3de..7debf4d3de 100755..100644
--- a/ext/intl/tests/locale_set_default.phpt
+++ b/ext/intl/tests/locale_set_default.phpt
diff --git a/ext/intl/tests/msgfmt_clone.phpt b/ext/intl/tests/msgfmt_clone.phpt
index 9d8ea64442..9d8ea64442 100755..100644
--- a/ext/intl/tests/msgfmt_clone.phpt
+++ b/ext/intl/tests/msgfmt_clone.phpt
diff --git a/ext/intl/tests/msgfmt_clone_bad_obj.phpt b/ext/intl/tests/msgfmt_clone_bad_obj.phpt
new file mode 100644
index 0000000000..48321094d1
--- /dev/null
+++ b/ext/intl/tests/msgfmt_clone_bad_obj.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Cloning unconstructed MessageFormatter
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+class A extends MessageFormatter {
+ function __construct() {}
+}
+
+$a = new A;
+try {
+ $b = clone $a;
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+--EXPECTF--
+string(%d) "Cannot clone unconstructed MessageFormatter"
diff --git a/ext/intl/tests/msgfmt_fail.phpt b/ext/intl/tests/msgfmt_fail.phpt
index bffb71c56d..bffb71c56d 100755..100644
--- a/ext/intl/tests/msgfmt_fail.phpt
+++ b/ext/intl/tests/msgfmt_fail.phpt
diff --git a/ext/intl/tests/msgfmt_format.phpt b/ext/intl/tests/msgfmt_format.phpt
index c1bf5e9db6..c1bf5e9db6 100755..100644
--- a/ext/intl/tests/msgfmt_format.phpt
+++ b/ext/intl/tests/msgfmt_format.phpt
diff --git a/ext/intl/tests/msgfmt_get_error.phpt b/ext/intl/tests/msgfmt_get_error.phpt
index 015c50d465..015c50d465 100755..100644
--- a/ext/intl/tests/msgfmt_get_error.phpt
+++ b/ext/intl/tests/msgfmt_get_error.phpt
diff --git a/ext/intl/tests/msgfmt_get_locale.phpt b/ext/intl/tests/msgfmt_get_locale.phpt
index 4c2651fe2b..4c2651fe2b 100755..100644
--- a/ext/intl/tests/msgfmt_get_locale.phpt
+++ b/ext/intl/tests/msgfmt_get_locale.phpt
diff --git a/ext/intl/tests/msgfmt_get_set_pattern.phpt b/ext/intl/tests/msgfmt_get_set_pattern.phpt
index 67b1aca459..67b1aca459 100755..100644
--- a/ext/intl/tests/msgfmt_get_set_pattern.phpt
+++ b/ext/intl/tests/msgfmt_get_set_pattern.phpt
diff --git a/ext/intl/tests/msgfmt_parse.phpt b/ext/intl/tests/msgfmt_parse.phpt
index b9ec36374b..b9ec36374b 100755..100644
--- a/ext/intl/tests/msgfmt_parse.phpt
+++ b/ext/intl/tests/msgfmt_parse.phpt
diff --git a/ext/intl/tests/normalizer_normalize.phpt b/ext/intl/tests/normalizer_normalize.phpt
index 238b7423cf..238b7423cf 100755..100644
--- a/ext/intl/tests/normalizer_normalize.phpt
+++ b/ext/intl/tests/normalizer_normalize.phpt
diff --git a/ext/intl/tests/regression_sort_and_cow.phpt b/ext/intl/tests/regression_sort_and_cow.phpt
index d7ff797705..d7ff797705 100755..100644
--- a/ext/intl/tests/regression_sort_and_cow.phpt
+++ b/ext/intl/tests/regression_sort_and_cow.phpt
diff --git a/ext/intl/tests/regression_sort_eq.phpt b/ext/intl/tests/regression_sort_eq.phpt
index 8676c5c931..8676c5c931 100755..100644
--- a/ext/intl/tests/regression_sort_eq.phpt
+++ b/ext/intl/tests/regression_sort_eq.phpt
diff --git a/ext/intl/tests/regression_sortwsk_and_cow.phpt b/ext/intl/tests/regression_sortwsk_and_cow.phpt
index a4953232ef..a4953232ef 100755..100644
--- a/ext/intl/tests/regression_sortwsk_and_cow.phpt
+++ b/ext/intl/tests/regression_sortwsk_and_cow.phpt
diff --git a/ext/intl/tests/regression_sortwsk_eq.phpt b/ext/intl/tests/regression_sortwsk_eq.phpt
index 945bac300a..945bac300a 100755..100644
--- a/ext/intl/tests/regression_sortwsk_eq.phpt
+++ b/ext/intl/tests/regression_sortwsk_eq.phpt
diff --git a/ext/intl/tests/resourcebundle.build b/ext/intl/tests/resourcebundle.build
index 6a7eeae5eb..6a7eeae5eb 100755..100644
--- a/ext/intl/tests/resourcebundle.build
+++ b/ext/intl/tests/resourcebundle.build
diff --git a/ext/intl/tests/resourcebundle_locales.phpt b/ext/intl/tests/resourcebundle_locales.phpt
index e14a7e5aa1..e14a7e5aa1 100755..100644
--- a/ext/intl/tests/resourcebundle_locales.phpt
+++ b/ext/intl/tests/resourcebundle_locales.phpt
diff --git a/ext/intl/tests/symfony_format_type_double_intl1.phpt b/ext/intl/tests/symfony_format_type_double_intl1.phpt
new file mode 100644
index 0000000000..13a7ad761f
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_double_intl1.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeDoubleIntl #1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeDoubleIntl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:1:"1";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeDoubleIntl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_DOUBLE);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ string(1) "1"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_double_intl2.phpt b/ext/intl/tests/symfony_format_type_double_intl2.phpt
new file mode 100644
index 0000000000..6bff7cc355
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_double_intl2.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeDoubleIntl #2
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeDoubleIntl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:3:"1.1";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeDoubleIntl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_DOUBLE);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(1.1)
+ [2]=>
+ string(3) "1.1"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_double_intl3.phpt b/ext/intl/tests/symfony_format_type_double_intl3.phpt
new file mode 100644
index 0000000000..3b0d576df7
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_double_intl3.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeDoubleIntl #3
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeDoubleIntl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:7:"SFD1.00";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeDoubleIntl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_DOUBLE);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ string(7) "SFD1.00"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_double_intl4.phpt b/ext/intl/tests/symfony_format_type_double_intl4.phpt
new file mode 100644
index 0000000000..3476e10892
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_double_intl4.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeDoubleIntl #4
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeDoubleIntl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:7:"SFD1.10";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeDoubleIntl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_DOUBLE);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(1.1)
+ [2]=>
+ string(7) "SFD1.10"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int32_intl1.phpt b/ext/intl/tests/symfony_format_type_int32_intl1.phpt
new file mode 100644
index 0000000000..2867b35690
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int32_intl1.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+// port of Symfony's Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest#testFormatTypeInt32Intl
+
+
+// Crashes on Windows
+// Windows note: the popup '...program has stopped working'(AEDebug Popup)
+// doesn't always show if you're rapidly running this test repeatedly.
+// regardless of that, the test always crashes every time.
+// (it will show up the first time, or if you wait a while before running it again.)
+// (the popup may also be disabled, which can be done with a registry setting.)
+// you can confirm it crashed by checking the exit code OR
+// the message this test prints at the very end (expected output for pass).
+//
+// Get Exit Code
+// Linux: echo $?
+// Windows: echo %ErrorLevel%
+
+
+
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:1:"1";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt32Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ string(1) "1"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int32_intl2.phpt b/ext/intl/tests/symfony_format_type_int32_intl2.phpt
new file mode 100644
index 0000000000..6a65a0a809
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int32_intl2.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #2
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+// StubNumberFormatterTest#testFormatTypeInt32Intl is tested many times, each with different args.
+// there are 7 sets of args that crash PHP (and other args that don't), each of those 7 is now a separate PHPT test
+// to ensure that each of the 7 args are always tested.
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:1:"1";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt32Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(1.1)
+ [2]=>
+ string(1) "1"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int32_intl3.phpt b/ext/intl/tests/symfony_format_type_int32_intl3.phpt
new file mode 100644
index 0000000000..5e657db419
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int32_intl3.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #3
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
+$unit_test_args = unserialize('a:4:{i:0;O:15:"NumberFormatter":0:{}i:1;d:2147483648;i:2;s:14:"-2,147,483,648";i:3;s:83:"->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt32Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(4) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(2147483648)
+ [2]=>
+ string(14) "-2,147,483,648"
+ [3]=>
+ string(83) "->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range."
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int32_intl4.phpt b/ext/intl/tests/symfony_format_type_int32_intl4.phpt
new file mode 100644
index 0000000000..54043d92e9
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int32_intl4.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #4
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:7:"SFD1.00";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt32Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ string(7) "SFD1.00"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int32_intl5.phpt b/ext/intl/tests/symfony_format_type_int32_intl5.phpt
new file mode 100644
index 0000000000..d5f78d7119
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int32_intl5.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #5
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:7:"SFD1.00";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt32Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(1.1)
+ [2]=>
+ string(7) "SFD1.00"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int32_intl6.phpt b/ext/intl/tests/symfony_format_type_int32_intl6.phpt
new file mode 100644
index 0000000000..fa708799d1
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int32_intl6.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #6
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
+$unit_test_args = unserialize('a:4:{i:0;O:15:"NumberFormatter":0:{}i:1;d:2147483648;i:2;s:21:"(SFD2,147,483,648.00)";i:3;s:83:"->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt32Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(4) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(2147483648)
+ [2]=>
+ string(21) "(SFD2,147,483,648.00)"
+ [3]=>
+ string(83) "->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range."
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int32_intl7.phpt b/ext/intl/tests/symfony_format_type_int32_intl7.phpt
new file mode 100644
index 0000000000..5bbe426677
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int32_intl7.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #7
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
+$unit_test_args = unserialize('a:4:{i:0;O:15:"NumberFormatter":0:{}i:1;d:-2147483649;i:2;s:19:"SFD2,147,483,647.00";i:3;s:83:"->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt32Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(4) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(-2147483649)
+ [2]=>
+ string(19) "SFD2,147,483,647.00"
+ [3]=>
+ string(83) "->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range."
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int64_intl1.phpt b/ext/intl/tests/symfony_format_type_int64_intl1.phpt
new file mode 100644
index 0000000000..01f5820911
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int64_intl1.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:1:"1";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt64Intl
+//$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ string(1) "1"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int64_intl2.phpt b/ext/intl/tests/symfony_format_type_int64_intl2.phpt
new file mode 100644
index 0000000000..13d1cdaee7
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int64_intl2.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #2
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:1:"1";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt64Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(1.1)
+ [2]=>
+ string(1) "1"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int64_intl3.phpt b/ext/intl/tests/symfony_format_type_int64_intl3.phpt
new file mode 100644
index 0000000000..a7c80b34c3
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int64_intl3.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #3
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:2147483648;i:2;s:13:"2,147,483,648";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt64Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(2147483648)
+ [2]=>
+ string(13) "2,147,483,648"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int64_intl4.phpt b/ext/intl/tests/symfony_format_type_int64_intl4.phpt
new file mode 100644
index 0000000000..f1a0801edf
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int64_intl4.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #4
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:-2147483649;i:2;s:14:"-2,147,483,649";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt64Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(-2147483649)
+ [2]=>
+ string(14) "-2,147,483,649"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int64_intl5.phpt b/ext/intl/tests/symfony_format_type_int64_intl5.phpt
new file mode 100644
index 0000000000..dad8735b89
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int64_intl5.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #5
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:7:"SFD1.00";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt64Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ int(1)
+ [2]=>
+ string(7) "SFD1.00"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int64_intl6.phpt b/ext/intl/tests/symfony_format_type_int64_intl6.phpt
new file mode 100644
index 0000000000..f038cbd0c3
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int64_intl6.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #6
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:7:"SFD1.00";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt64Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(1.1)
+ [2]=>
+ string(7) "SFD1.00"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int64_intl7.phpt b/ext/intl/tests/symfony_format_type_int64_intl7.phpt
new file mode 100644
index 0000000000..9c8853cafc
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int64_intl7.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #7
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:2147483648;i:2;s:19:"SFD2,147,483,648.00";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt64Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(2147483648)
+ [2]=>
+ string(19) "SFD2,147,483,648.00"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/symfony_format_type_int64_intl8.phpt b/ext/intl/tests/symfony_format_type_int64_intl8.phpt
new file mode 100644
index 0000000000..50524976ab
--- /dev/null
+++ b/ext/intl/tests/symfony_format_type_int64_intl8.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #8
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+
+// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
+$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:-2147483649;i:2;s:21:"(SFD2,147,483,649.00)";}');
+
+var_dump($unit_test_args);
+
+// execute the code from #testFormatTypeInt64Intl
+$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
+
+echo "== didn't crash ==".PHP_EOL;
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ object(NumberFormatter)#1 (0) {
+ }
+ [1]=>
+ float(-2147483649)
+ [2]=>
+ string(21) "(SFD2,147,483,649.00)"
+}
+== didn't crash ==
diff --git a/ext/intl/tests/ut_common.inc b/ext/intl/tests/ut_common.inc
index 09be22bf5a..09be22bf5a 100755..100644
--- a/ext/intl/tests/ut_common.inc
+++ b/ext/intl/tests/ut_common.inc
diff --git a/ext/mcrypt/tests/mcrypt_cbf.phpt b/ext/mcrypt/tests/mcrypt_cfb.phpt
index 8ec3cd7d3e..54919c8589 100644
--- a/ext/mcrypt/tests/mcrypt_cbf.phpt
+++ b/ext/mcrypt/tests/mcrypt_cfb.phpt
@@ -1,5 +1,5 @@
--TEST--
-mcrypt_cbf
+mcrypt_cfb
--SKIPIF--
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
--FILE--
@@ -8,7 +8,7 @@ $key = "FooBar";
$secret = "PHP Testfest 2008";
$cipher = MCRYPT_RIJNDAEL_128;
-$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher, MCRYPT_MODE_ECB), MCRYPT_RAND);
+$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher, MCRYPT_MODE_CFB), MCRYPT_RAND);
$enc_data = mcrypt_cfb($cipher, $key, $secret, MCRYPT_ENCRYPT, $iv);
// we have to trim as AES rounds the blocks and decrypt doesnt detect that
@@ -20,4 +20,4 @@ mcrypt_cfb($cipher, $key, $enc_data, MCRYPT_DECRYPT);
--EXPECTF--
PHP Testfest 2008
-Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d \ No newline at end of file
+Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d
diff --git a/ext/mcrypt/tests/mcrypt_create_iv.phpt b/ext/mcrypt/tests/mcrypt_create_iv.phpt
index cf6456fef7..1aa48868b0 100644
--- a/ext/mcrypt/tests/mcrypt_create_iv.phpt
+++ b/ext/mcrypt/tests/mcrypt_create_iv.phpt
@@ -5,13 +5,13 @@ mcrypt_create_iv
--FILE--
<?php
$iv1 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND);
-$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_192, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
-$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM);
+$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
+$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM);
echo strlen($iv1) . "\n";
echo strlen($iv2) . "\n";
echo strlen($iv3) . "\n";
--EXPECT--
16
-24
-32
+16
+16
diff --git a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
index c2685a572e..474065faf1 100644
--- a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
+++ b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
@@ -2,13 +2,12 @@
LOAD DATA INFILE - open_basedir
--SKIPIF--
<?php
-@include_once("connect.inc");
+include_once('skipif.inc');
if (!isset($db)) {
die("skip open_basedir setting prevents inclusing of required files");
}
-include_once('skipif.inc');
include_once('skipifconnectfailure.inc');
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index fbfc02e2fc..0ef67a2c44 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -705,6 +705,11 @@ PHP_FUNCTION(mysqli_poll)
RETURN_FALSE;
}
+ if (!r_array && !e_array) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "No stream arrays were passed");
+ RETURN_FALSE;
+ }
+
if (r_array != NULL) {
mysqlnd_zval_array_to_mysqlnd_array(r_array, &new_r_array TSRMLS_CC);
}
diff --git a/ext/mysqli/tests/bug62885.phpt b/ext/mysqli/tests/bug62885.phpt
new file mode 100644
index 0000000000..9fb0aa0f03
--- /dev/null
+++ b/ext/mysqli/tests/bug62885.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #62885 (mysqli_poll - Segmentation fault)
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once("connect.inc");
+if (!$IS_MYSQLND) {
+ die("skip mysqlnd only test");
+}
+?>
+--FILE--
+<?php
+error_reporting(E_ALL);
+$tablica = array();
+$test1 = mysqli_poll($test2, $test3, $tablica, null);
+
+$test2 = array();
+$test2 = array();
+$test1 = mysqli_poll($test2, $test3, $tablica, null);
+echo "okey";
+?>
+--EXPECTF--
+Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d
+
+Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d
+okey
diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt
index 8bb28733fe..edb2a12ff0 100644
--- a/ext/oci8/tests/bind_char_2_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_2_11gR1.phpt
@@ -5,7 +5,7 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
-if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
+if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt
index 4c6241ccfd..fea77754d1 100644
--- a/ext/oci8/tests/bind_char_3_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_3_11gR1.phpt
@@ -5,7 +5,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
-if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
+if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt
index 14d5878856..2bc2f14246 100644
--- a/ext/oci8/tests/bind_char_4_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_4_11gR1.phpt
@@ -5,7 +5,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
-if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
+if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc
index 0f03c3a65f..9a86c46868 100644
--- a/ext/oci8/tests/details.inc
+++ b/ext/oci8/tests/details.inc
@@ -45,31 +45,34 @@ if (file_exists(dirname(__FILE__)."/details_local.inc")) {
* Used for creating/dropping schema objects used by a test
*/
-function oci8_test_sql_execute($c, $stmtarray)
-{
- foreach ($stmtarray as $stmt) {
- $s = oci_parse($c, $stmt);
- if (!$s) {
- $m = oci_error($c);
- echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
- }
- else {
- $r = @oci_execute($s);
- if (!$r) {
- $m = oci_error($s);
- if (!in_array($m['code'], array( // ignore expected errors
- 942 // table or view does not exist
- , 1918 // user does not exist
- , 2024 // database link not found
- , 2289 // sequence does not exist
- , 4080 // trigger does not exist
- , 38802 // edition does not exist
- ))) {
- echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
- }
- }
- }
- }
+if (!function_exists('oci8_test_sql_execute')) {
+ function oci8_test_sql_execute($c, $stmtarray)
+ {
+ foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ if (!$s) {
+ $m = oci_error($c);
+ echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
+ }
+ else {
+ $r = @oci_execute($s);
+ if (!$r) {
+ $m = oci_error($s);
+ if (!in_array($m['code'], array( // ignore expected errors
+ 942 // table or view does not exist
+ , 1918 // user does not exist
+ , 2024 // database link not found
+ , 2289 // sequence does not exist
+ , 4080 // trigger does not exist
+ , 38802 // edition does not exist
+ ))) {
+ echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
+ }
+ }
+ }
+ }
+ }
+
}
?>
diff --git a/ext/oci8/tests/pecl_bug10194.phpt b/ext/oci8/tests/pecl_bug10194.phpt
index 9947e15dbc..3c1c7887c2 100644
--- a/ext/oci8/tests/pecl_bug10194.phpt
+++ b/ext/oci8/tests/pecl_bug10194.phpt
@@ -5,6 +5,9 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
+if (getenv("USE_ZEND_ALLOC") === "0") {
+ die("skip Zend MM disabled");
+}
?>
--INI--
memory_limit=10M
diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt
index faf87ab3c1..96f94bcf4c 100644
--- a/ext/oci8/tests/pecl_bug10194_blob.phpt
+++ b/ext/oci8/tests/pecl_bug10194_blob.phpt
@@ -6,6 +6,9 @@ $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on t
require(dirname(__FILE__).'/skipif.inc');
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
+if (getenv("USE_ZEND_ALLOC") === "0") {
+ die("skip Zend MM disabled");
+}
?>
--INI--
memory_limit=3M
diff --git a/ext/oci8/tests/pecl_bug10194_blob_64.phpt b/ext/oci8/tests/pecl_bug10194_blob_64.phpt
index 45788a41b4..e1a4cc034e 100644
--- a/ext/oci8/tests/pecl_bug10194_blob_64.phpt
+++ b/ext/oci8/tests/pecl_bug10194_blob_64.phpt
@@ -6,6 +6,9 @@ $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on t
require(dirname(__FILE__).'/skipif.inc');
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
+if (getenv("USE_ZEND_ALLOC") === "0") {
+ die("skip Zend MM disabled");
+}
?>
--INI--
memory_limit=6M
diff --git a/ext/oci8/tests/xmltype_01.phpt b/ext/oci8/tests/xmltype_01.phpt
index 21aca6cc12..ebbbb31fac 100644
--- a/ext/oci8/tests/xmltype_01.phpt
+++ b/ext/oci8/tests/xmltype_01.phpt
@@ -5,6 +5,7 @@ Basic XMLType test
if (!extension_loaded("simplexml")) die("skip no simplexml extension");
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
+?>
--FILE--
<?php
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 6b3ba3bb1b..4035b2b910 100755
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -694,7 +694,7 @@ static PHP_METHOD(PDO, inTransaction)
}
PDO_CONSTRUCT_CHECK;
- RETURN_LONG(dbh->in_txn);
+ RETURN_BOOL(dbh->in_txn);
}
/* }}} */
diff --git a/ext/pdo/tests/bug_43130.phpt b/ext/pdo/tests/bug_43130.phpt
index a35138a07f..70f8887111 100644
--- a/ext/pdo/tests/bug_43130.phpt
+++ b/ext/pdo/tests/bug_43130.phpt
@@ -8,6 +8,7 @@ if (false == $dir) die('skip no driver');
if (!strncasecmp(getenv('PDOTEST_DSN'), 'sqlite', strlen('sqlite'))) die('skip not relevant for sqlite driver');
if (!strncasecmp(getenv('PDOTEST_DSN'), 'pgsql', strlen('pgsql'))) die('skip not relevant for pgsql driver');
if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - Hyphen is not legal for bind names in Oracle DB');
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for firebird driver');
require_once $dir . 'pdo_test.inc';
PDOTest::skip();
?>
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index f7d08da4ab..7b7d559811 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -2653,11 +2653,8 @@ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert,
len = -len;
}
user_stub = 0;
-#if PHP_MAJOR_VERSION >= 6
- if (!(len = php_stream_copy_to_mem(stubfile, (void **) &user_stub, len, 0)) || !user_stub) {
-#else
+
if (!(len = php_stream_copy_to_mem(stubfile, &user_stub, len, 0)) || !user_stub) {
-#endif
if (closeoldfile) {
php_stream_close(oldfile);
}
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 0335615ea4..d19f30c612 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -58,9 +58,6 @@ static int phar_file_type(HashTable *mimes, char *file, char **mime_type TSRMLS_
static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char *basename, int request_uri_len TSRMLS_DC) /* {{{ */
{
-#if PHP_MAJOR_VERSION >= 6
- int is_unicode = 0;
-#endif
HashTable *_SERVER;
zval **stuff;
char *path_info;
@@ -76,18 +73,7 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
_SERVER = Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]);
/* PATH_INFO and PATH_TRANSLATED should always be munged */
-#if PHP_MAJOR_VERSION >= 6
- if (phar_find_key(_SERVER, "PATH_INFO", sizeof("PATH_INFO"), (void **) &stuff TSRMLS_CC)) {
- if (Z_TYPE_PP(stuff) == IS_UNICODE) {
- is_unicode = 1;
- zval_unicode_to_string(*stuff TSRMLS_CC);
- } else {
- is_unicode = 0;
- }
-#else
if (SUCCESS == zend_hash_find(_SERVER, "PATH_INFO", sizeof("PATH_INFO"), (void **) &stuff)) {
-#endif
-
path_info = Z_STRVAL_PP(stuff);
code = Z_STRLEN_PP(stuff);
@@ -96,38 +82,19 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
MAKE_STD_ZVAL(temp);
ZVAL_STRINGL(temp, path_info, code, 0);
-#if PHP_MAJOR_VERSION >= 6
- if (is_unicode) {
- zval_string_to_unicode(*stuff TSRMLS_CC);
- }
-#endif
+
zend_hash_update(_SERVER, "PHAR_PATH_INFO", sizeof("PHAR_PATH_INFO"), &temp, sizeof(zval **), NULL);
}
}
-#if PHP_MAJOR_VERSION >= 6
- if (phar_find_key(_SERVER, "PATH_TRANSLATED", sizeof("PATH_TRANSLATED"), (void **) &stuff TSRMLS_CC)) {
- if (Z_TYPE_PP(stuff) == IS_UNICODE) {
- is_unicode = 1;
- zval_unicode_to_string(*stuff TSRMLS_CC);
- } else {
- is_unicode = 0;
- }
-#else
if (SUCCESS == zend_hash_find(_SERVER, "PATH_TRANSLATED", sizeof("PATH_TRANSLATED"), (void **) &stuff)) {
-#endif
-
path_info = Z_STRVAL_PP(stuff);
code = Z_STRLEN_PP(stuff);
Z_STRLEN_PP(stuff) = spprintf(&(Z_STRVAL_PP(stuff)), 4096, "phar://%s%s", fname, entry);
MAKE_STD_ZVAL(temp);
ZVAL_STRINGL(temp, path_info, code, 0);
-#if PHP_MAJOR_VERSION >= 6
- if (is_unicode) {
- zval_string_to_unicode(*stuff TSRMLS_CC);
- }
-#endif
+
zend_hash_update(_SERVER, "PHAR_PATH_TRANSLATED", sizeof("PHAR_PATH_TRANSLATED"), (void *) &temp, sizeof(zval **), NULL);
}
@@ -136,18 +103,7 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
}
if (PHAR_GLOBALS->phar_SERVER_mung_list & PHAR_MUNG_REQUEST_URI) {
-#if PHP_MAJOR_VERSION >= 6
- if (phar_find_key(_SERVER, "REQUEST_URI", sizeof("REQUEST_URI"), (void **) &stuff TSRMLS_CC)) {
- if (Z_TYPE_PP(stuff) == IS_UNICODE) {
- is_unicode = 1;
- zval_unicode_to_string(*stuff TSRMLS_CC);
- } else {
- is_unicode = 0;
- }
-#else
if (SUCCESS == zend_hash_find(_SERVER, "REQUEST_URI", sizeof("REQUEST_URI"), (void **) &stuff)) {
-#endif
-
path_info = Z_STRVAL_PP(stuff);
code = Z_STRLEN_PP(stuff);
@@ -156,29 +112,14 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
MAKE_STD_ZVAL(temp);
ZVAL_STRINGL(temp, path_info, code, 0);
-#if PHP_MAJOR_VERSION >= 6
- if (is_unicode) {
- zval_string_to_unicode(*stuff TSRMLS_CC);
- }
-#endif
+
zend_hash_update(_SERVER, "PHAR_REQUEST_URI", sizeof("PHAR_REQUEST_URI"), (void *) &temp, sizeof(zval **), NULL);
}
}
}
if (PHAR_GLOBALS->phar_SERVER_mung_list & PHAR_MUNG_PHP_SELF) {
-#if PHP_MAJOR_VERSION >= 6
- if (phar_find_key(_SERVER, "PHP_SELF", sizeof("PHP_SELF"), (void **) &stuff TSRMLS_CC)) {
- if (Z_TYPE_PP(stuff) == IS_UNICODE) {
- is_unicode = 1;
- zval_unicode_to_string(*stuff TSRMLS_CC);
- } else {
- is_unicode = 0;
- }
-#else
if (SUCCESS == zend_hash_find(_SERVER, "PHP_SELF", sizeof("PHP_SELF"), (void **) &stuff)) {
-#endif
-
path_info = Z_STRVAL_PP(stuff);
code = Z_STRLEN_PP(stuff);
@@ -187,68 +128,34 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
MAKE_STD_ZVAL(temp);
ZVAL_STRINGL(temp, path_info, code, 0);
-#if PHP_MAJOR_VERSION >= 6
- if (is_unicode) {
- zval_string_to_unicode(*stuff TSRMLS_CC);
- }
-#endif
+
zend_hash_update(_SERVER, "PHAR_PHP_SELF", sizeof("PHAR_PHP_SELF"), (void *) &temp, sizeof(zval **), NULL);
}
}
}
if (PHAR_GLOBALS->phar_SERVER_mung_list & PHAR_MUNG_SCRIPT_NAME) {
-#if PHP_MAJOR_VERSION >= 6
- if (phar_find_key(_SERVER, "SCRIPT_NAME", sizeof("SCRIPT_NAME"), (void **) &stuff TSRMLS_CC)) {
- if (Z_TYPE_PP(stuff) == IS_UNICODE) {
- is_unicode = 1;
- zval_unicode_to_string(*stuff TSRMLS_CC);
- } else {
- is_unicode = 0;
- }
-#else
if (SUCCESS == zend_hash_find(_SERVER, "SCRIPT_NAME", sizeof("SCRIPT_NAME"), (void **) &stuff)) {
-#endif
-
path_info = Z_STRVAL_PP(stuff);
code = Z_STRLEN_PP(stuff);
ZVAL_STRINGL(*stuff, entry, entry_len, 1);
MAKE_STD_ZVAL(temp);
ZVAL_STRINGL(temp, path_info, code, 0);
-#if PHP_MAJOR_VERSION >= 6
- if (is_unicode) {
- zval_string_to_unicode(*stuff TSRMLS_CC);
- }
-#endif
+
zend_hash_update(_SERVER, "PHAR_SCRIPT_NAME", sizeof("PHAR_SCRIPT_NAME"), (void *) &temp, sizeof(zval **), NULL);
}
}
if (PHAR_GLOBALS->phar_SERVER_mung_list & PHAR_MUNG_SCRIPT_FILENAME) {
-#if PHP_MAJOR_VERSION >= 6
- if (phar_find_key(_SERVER, "SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME"), (void **) &stuff TSRMLS_CC)) {
- if (Z_TYPE_PP(stuff) == IS_UNICODE) {
- is_unicode = 1;
- zval_unicode_to_string(*stuff TSRMLS_CC);
- } else {
- is_unicode = 0;
- }
-#else
if (SUCCESS == zend_hash_find(_SERVER, "SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME"), (void **) &stuff)) {
-#endif
-
path_info = Z_STRVAL_PP(stuff);
code = Z_STRLEN_PP(stuff);
Z_STRLEN_PP(stuff) = spprintf(&(Z_STRVAL_PP(stuff)), 4096, "phar://%s%s", fname, entry);
MAKE_STD_ZVAL(temp);
ZVAL_STRINGL(temp, path_info, code, 0);
-#if PHP_MAJOR_VERSION >= 6
- if (is_unicode) {
- zval_string_to_unicode(*stuff TSRMLS_CC);
- }
-#endif
+
zend_hash_update(_SERVER, "PHAR_SCRIPT_FILENAME", sizeof("PHAR_SCRIPT_FILENAME"), (void *) &temp, sizeof(zval **), NULL);
}
}
@@ -940,11 +847,7 @@ PHP_METHOD(Phar, webPhar)
if (ext) {
++ext;
-#if PHP_MAJOR_VERSION >= 6
- if (phar_find_key(Z_ARRVAL_P(mimeoverride), ext, strlen(ext)+1, (void **) &val TSRMLS_CC)) {
-#else
if (SUCCESS == zend_hash_find(Z_ARRVAL_P(mimeoverride), ext, strlen(ext)+1, (void **) &val)) {
-#endif
switch (Z_TYPE_PP(val)) {
case IS_LONG:
if (Z_LVAL_PP(val) == PHAR_MIME_PHP || Z_LVAL_PP(val) == PHAR_MIME_PHPS) {
@@ -958,11 +861,6 @@ PHP_METHOD(Phar, webPhar)
RETURN_FALSE;
}
break;
-#if PHP_MAJOR_VERSION >= 6
- case IS_UNICODE:
- zval_unicode_to_string(*(val) TSRMLS_CC);
- /* break intentionally omitted */
-#endif
case IS_STRING:
mime_type = Z_STRVAL_PP(val);
code = PHAR_MIME_OTHER;
@@ -1013,26 +911,12 @@ PHP_METHOD(Phar, mungServer)
for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(mungvalues)); SUCCESS == zend_hash_has_more_elements(Z_ARRVAL_P(mungvalues)); zend_hash_move_forward(Z_ARRVAL_P(mungvalues))) {
zval **data = NULL;
-#if PHP_MAJOR_VERSION >= 6
- zval *unicopy = NULL;
-#endif
if (SUCCESS != zend_hash_get_current_data(Z_ARRVAL_P(mungvalues), (void **) &data)) {
zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, "unable to retrieve array value in Phar::mungServer()");
return;
}
-#if PHP_MAJOR_VERSION >= 6
- if (Z_TYPE_PP(data) == IS_UNICODE) {
- MAKE_STD_ZVAL(unicopy);
- *unicopy = **data;
- zval_copy_ctor(unicopy);
- INIT_PZVAL(unicopy);
- zval_unicode_to_string(unicopy TSRMLS_CC);
- data = &unicopy;
- }
-#endif
-
if (Z_TYPE_PP(data) != IS_STRING) {
zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, "Non-string value passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME");
return;
@@ -1054,11 +938,6 @@ PHP_METHOD(Phar, mungServer)
if (Z_STRLEN_PP(data) == sizeof("SCRIPT_FILENAME")-1 && !strncmp(Z_STRVAL_PP(data), "SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME")-1)) {
PHAR_GLOBALS->phar_SERVER_mung_list |= PHAR_MUNG_SCRIPT_FILENAME;
}
-#if PHP_MAJOR_VERSION >= 6
- if (unicopy) {
- zval_ptr_dtor(&unicopy);
- }
-#endif
}
}
/* }}} */
@@ -5033,11 +4912,7 @@ PHP_METHOD(PharFileInfo, getContent)
phar_seek_efp(link, 0, SEEK_SET, 0, 0 TSRMLS_CC);
Z_TYPE_P(return_value) = IS_STRING;
-#if PHP_MAJOR_VERSION >= 6
- Z_STRLEN_P(return_value) = php_stream_copy_to_mem(fp, (void **) &(Z_STRVAL_P(return_value)), link->uncompressed_filesize, 0);
-#else
Z_STRLEN_P(return_value) = php_stream_copy_to_mem(fp, &(Z_STRVAL_P(return_value)), link->uncompressed_filesize, 0);
-#endif
if (!Z_STRVAL_P(return_value)) {
Z_STRVAL_P(return_value) = estrndup("", 0);
diff --git a/ext/phar/stream.c b/ext/phar/stream.c
index 7e74ed60f3..ccfe2a5886 100644
--- a/ext/phar/stream.c
+++ b/ext/phar/stream.c
@@ -207,30 +207,19 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, char *pat
fpf = php_stream_alloc(&phar_ops, idata, NULL, mode);
php_url_free(resource);
efree(internal_file);
-#if PHP_MAJOR_VERSION >= 6
- if (context && context->options && phar_find_key(HASH_OF(context->options), "phar", sizeof("phar"), (void**)&pzoption TSRMLS_CC)) {
-#else
+
if (context && context->options && zend_hash_find(HASH_OF(context->options), "phar", sizeof("phar"), (void**)&pzoption) == SUCCESS) {
-#endif
pharcontext = HASH_OF(*pzoption);
if (idata->internal_file->uncompressed_filesize == 0
&& idata->internal_file->compressed_filesize == 0
-#if PHP_MAJOR_VERSION >= 6
- && phar_find_key(pharcontext, "compress", sizeof("compress"), (void**)&pzoption TSRMLS_CC)
-#else
&& zend_hash_find(pharcontext, "compress", sizeof("compress"), (void**)&pzoption) == SUCCESS
-#endif
&& Z_TYPE_PP(pzoption) == IS_LONG
&& (Z_LVAL_PP(pzoption) & ~PHAR_ENT_COMPRESSION_MASK) == 0
) {
idata->internal_file->flags &= ~PHAR_ENT_COMPRESSION_MASK;
idata->internal_file->flags |= Z_LVAL_PP(pzoption);
}
-#if PHP_MAJOR_VERSION >= 6
- if (phar_find_key(pharcontext, "metadata", sizeof("metadata"), (void**)&pzoption TSRMLS_CC)) {
-#else
if (zend_hash_find(pharcontext, "metadata", sizeof("metadata"), (void**)&pzoption) == SUCCESS) {
-#endif
if (idata->internal_file->metadata) {
zval_ptr_dtor(&idata->internal_file->metadata);
idata->internal_file->metadata = NULL;
diff --git a/ext/phar/tar.c b/ext/phar/tar.c
index 917734c992..43d1ede238 100644
--- a/ext/phar/tar.c
+++ b/ext/phar/tar.c
@@ -986,11 +986,8 @@ int phar_tar_flush(phar_archive_data *phar, char *user_stub, long len, int defau
len = -len;
}
user_stub = 0;
-#if PHP_MAJOR_VERSION >= 6
- if (!(len = php_stream_copy_to_mem(stubfile, (void **) &user_stub, len, 0)) || !user_stub) {
-#else
+
if (!(len = php_stream_copy_to_mem(stubfile, &user_stub, len, 0)) || !user_stub) {
-#endif
if (error) {
spprintf(error, 0, "unable to read resource to copy stub to new tar-based phar \"%s\"", phar->fname);
}
diff --git a/ext/phar/tests/008.phpt b/ext/phar/tests/008.phpt
index 664ffea5cb..bede8ba1c1 100644
--- a/ext/phar/tests/008.phpt
+++ b/ext/phar/tests/008.phpt
@@ -2,6 +2,8 @@
Phar::mapPhar truncated manifest (not enough for manifest length)
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip");?>
+--INI--
+detect_unicode=0
--FILE--
<?php
$file = "<?php
diff --git a/ext/phar/tests/009.phpt b/ext/phar/tests/009.phpt
index 61933b3814..55d13b353c 100644
--- a/ext/phar/tests/009.phpt
+++ b/ext/phar/tests/009.phpt
@@ -4,6 +4,7 @@ Phar::mapPhar too many manifest entries
<?php if (!extension_loaded("phar")) die("skip");?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$file = b"<?php
diff --git a/ext/phar/tests/010.phpt b/ext/phar/tests/010.phpt
index d1e2f40c9c..441f13dc64 100644
--- a/ext/phar/tests/010.phpt
+++ b/ext/phar/tests/010.phpt
@@ -4,6 +4,7 @@ Phar::mapPhar buffer overrun
<?php if (!extension_loaded("phar")) die("skip");?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$file = b"<?php
diff --git a/ext/phar/tests/011.phpt b/ext/phar/tests/011.phpt
index 4a1f0dd42c..9923f853e4 100644
--- a/ext/phar/tests/011.phpt
+++ b/ext/phar/tests/011.phpt
@@ -4,6 +4,7 @@ Phar::mapPhar filesize too small in manifest
<?php if (!extension_loaded("phar")) die("skip");?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
diff --git a/ext/phar/tests/012.phpt b/ext/phar/tests/012.phpt
index 3246eff468..37ff8bb19e 100644
--- a/ext/phar/tests/012.phpt
+++ b/ext/phar/tests/012.phpt
@@ -4,6 +4,7 @@ Phar::mapPhar valid file
<?php if (!extension_loaded("phar")) die("skip");?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
diff --git a/ext/phar/tests/018.phpt b/ext/phar/tests/018.phpt
index 2e2df470bf..71fa622402 100644
--- a/ext/phar/tests/018.phpt
+++ b/ext/phar/tests/018.phpt
@@ -7,6 +7,7 @@ if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of P
?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -33,4 +34,4 @@ while (false !== ($a = readdir($dir))) {
string(1) "a"
bool(false)
string(1) "b"
-bool(true) \ No newline at end of file
+bool(true)
diff --git a/ext/phar/tests/019b.phpt b/ext/phar/tests/019b.phpt
index 5a0ef71335..22d193efd6 100755
--- a/ext/phar/tests/019b.phpt
+++ b/ext/phar/tests/019b.phpt
@@ -7,6 +7,7 @@ if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of P
?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
diff --git a/ext/phar/tests/019c.phpt b/ext/phar/tests/019c.phpt
index 2cb508c46c..23afa26190 100755
--- a/ext/phar/tests/019c.phpt
+++ b/ext/phar/tests/019c.phpt
@@ -7,6 +7,7 @@ if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of P
?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
diff --git a/ext/phar/tests/020.phpt b/ext/phar/tests/020.phpt
index 7d01681b6f..334a16dbf1 100644
--- a/ext/phar/tests/020.phpt
+++ b/ext/phar/tests/020.phpt
@@ -4,6 +4,7 @@ Phar: url stat
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -133,4 +134,4 @@ array(26) {
int(-1)
[%sblocks"]=>
int(-1)
-} \ No newline at end of file
+}
diff --git a/ext/phar/tests/021.phpt b/ext/phar/tests/021.phpt
index bfd6576952..af062dbcf1 100644
--- a/ext/phar/tests/021.phpt
+++ b/ext/phar/tests/021.phpt
@@ -4,6 +4,7 @@ Phar: stream stat
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -82,4 +83,4 @@ array(26) {
int(-1)
[%sblocks"]=>
int(-1)
-} \ No newline at end of file
+}
diff --git a/ext/phar/tests/022.phpt b/ext/phar/tests/022.phpt
index 20c24a0214..934add4721 100644
--- a/ext/phar/tests/022.phpt
+++ b/ext/phar/tests/022.phpt
@@ -4,6 +4,7 @@ Phar: stream stat
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
diff --git a/ext/phar/tests/028.phpt b/ext/phar/tests/028.phpt
index 087f822777..8cead29ff4 100755
--- a/ext/phar/tests/028.phpt
+++ b/ext/phar/tests/028.phpt
@@ -4,6 +4,7 @@ Phar::loadPhar
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
diff --git a/ext/phar/tests/cache_list/copyonwrite1.phar.phpt b/ext/phar/tests/cache_list/copyonwrite1.phar.phpt
index 90b0a8fe46..f3105194eb 100644
--- a/ext/phar/tests/cache_list/copyonwrite1.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite1.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 1 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite1.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -11,4 +12,4 @@ files/write.phar
--EXPECT--
hi
changed
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite10.phar.phpt b/ext/phar/tests/cache_list/copyonwrite10.phar.phpt
index 3d5b7fe784..959c6e0a94 100644
--- a/ext/phar/tests/cache_list/copyonwrite10.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite10.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 10 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite10.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -21,4 +22,4 @@ __HALT_COMPILER(); ?>
"
<?php __HALT_COMPILER(); ?>
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite11.phar.phpt b/ext/phar/tests/cache_list/copyonwrite11.phar.phpt
index 65388163dc..f48df3776d 100644
--- a/ext/phar/tests/cache_list/copyonwrite11.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite11.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 11 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite11.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -19,4 +20,4 @@ echo "ok\n";
__HALT_COMPILER(); ?>
"
6685
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite12.phar.phpt b/ext/phar/tests/cache_list/copyonwrite12.phar.phpt
index 40b544191d..ef5d02ccc8 100644
--- a/ext/phar/tests/cache_list/copyonwrite12.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite12.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 12 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite12.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -21,4 +22,4 @@ array(2) {
["hash_type"]=>
string(3) "MD5"
}
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite13.phar.phpt b/ext/phar/tests/cache_list/copyonwrite13.phar.phpt
index fc47174d2b..bd49565c83 100644
--- a/ext/phar/tests/cache_list/copyonwrite13.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite13.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 13 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite13.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
@@ -12,4 +13,4 @@ files/write13.phar
--EXPECTF--
bool(false)
bool(true)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite14.phar.phpt b/ext/phar/tests/cache_list/copyonwrite14.phar.phpt
index 11201ac989..9b4a65c54c 100644
--- a/ext/phar/tests/cache_list/copyonwrite14.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite14.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 14 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite14.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
@@ -12,4 +13,4 @@ files/write14.phar
--EXPECTF--
bool(true)
bool(false)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite15.phar.phpt b/ext/phar/tests/cache_list/copyonwrite15.phar.phpt
index 6e46289227..545201e389 100644
--- a/ext/phar/tests/cache_list/copyonwrite15.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite15.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 15 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite15.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -11,4 +12,4 @@ files/write15.phar
--EXPECTF--
bool(false)
bool(true)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite16.phar.phpt b/ext/phar/tests/cache_list/copyonwrite16.phar.phpt
index f17784c355..5cc9cb415a 100644
--- a/ext/phar/tests/cache_list/copyonwrite16.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite16.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 16 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite16.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -11,4 +12,4 @@ files/write16.phar
--EXPECTF--
bool(true)
bool(false)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite17.phar.phpt b/ext/phar/tests/cache_list/copyonwrite17.phar.phpt
index 158c049b14..74dc6619c1 100644
--- a/ext/phar/tests/cache_list/copyonwrite17.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite17.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 17 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite17.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -11,4 +12,4 @@ files/write17.phar
--EXPECTF--
NULL
%string|unicode%(2) "hi"
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite18.phar.phpt b/ext/phar/tests/cache_list/copyonwrite18.phar.phpt
index 3e65f5a124..03112c18be 100644
--- a/ext/phar/tests/cache_list/copyonwrite18.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite18.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 18 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite18.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -11,4 +12,4 @@ files/write18.phar
--EXPECTF--
100666
100444
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite19.phar.phpt b/ext/phar/tests/cache_list/copyonwrite19.phar.phpt
index 6e03554d96..23fe5879a9 100644
--- a/ext/phar/tests/cache_list/copyonwrite19.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite19.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 19 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite19.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -11,4 +12,4 @@ files/write19.phar
--EXPECTF--
string(2) "hi"
%string|unicode%(3) "hi2"
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite2.phar.phpt b/ext/phar/tests/cache_list/copyonwrite2.phar.phpt
index 8d21c813a4..9246a630c6 100644
--- a/ext/phar/tests/cache_list/copyonwrite2.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite2.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 2 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite2.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -14,4 +15,4 @@ bool(true)
string(2) "hi"
bool(true)
bool(true)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite20.phar.phpt b/ext/phar/tests/cache_list/copyonwrite20.phar.phpt
index acce57415c..10c56342e9 100644
--- a/ext/phar/tests/cache_list/copyonwrite20.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite20.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 20 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite20.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -11,4 +12,4 @@ files/write20.phar
--EXPECTF--
string(2) "hi"
NULL
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite21.phar.phpt b/ext/phar/tests/cache_list/copyonwrite21.phar.phpt
index 8960ea7171..409273db6c 100644
--- a/ext/phar/tests/cache_list/copyonwrite21.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite21.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 21 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite21.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
@@ -12,4 +13,4 @@ files/write21.phar
--EXPECTF--
bool(false)
bool(true)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite22.phar.phpt b/ext/phar/tests/cache_list/copyonwrite22.phar.phpt
index 7cba216395..9e7ad6c741 100644
--- a/ext/phar/tests/cache_list/copyonwrite22.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite22.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 22 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite22.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
@@ -12,4 +13,4 @@ files/write22.phar
--EXPECTF--
bool(true)
bool(false)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite23.phar.phpt b/ext/phar/tests/cache_list/copyonwrite23.phar.phpt
index 292e5af668..28412928b6 100644
--- a/ext/phar/tests/cache_list/copyonwrite23.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite23.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 23 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite23.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
@@ -14,4 +15,4 @@ bool(true)
bool(false)
bool(false)
bool(true)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite24.phar.phpt b/ext/phar/tests/cache_list/copyonwrite24.phar.phpt
index 69197f2b4b..3aaba359f5 100644
--- a/ext/phar/tests/cache_list/copyonwrite24.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite24.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 24 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite24.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
@@ -12,4 +13,4 @@ files/write24.phar
--EXPECTF--
bool(false)
bool(true)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite25.phar.phpt b/ext/phar/tests/cache_list/copyonwrite25.phar.phpt
index b661cb61c1..73a1d7648a 100644
--- a/ext/phar/tests/cache_list/copyonwrite25.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite25.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 25 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite25.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
@@ -13,4 +14,4 @@ files/write25.phar
bool(false)
bool(true)
<?php __HALT_COMPILER();
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite3.phar.phpt b/ext/phar/tests/cache_list/copyonwrite3.phar.phpt
index 7e2c94c5b2..44815ef522 100644
--- a/ext/phar/tests/cache_list/copyonwrite3.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite3.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 3 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite3.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -13,4 +14,4 @@ bool(true)
bool(true)
bool(false)
bool(false)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite4.phar.phpt b/ext/phar/tests/cache_list/copyonwrite4.phar.phpt
index 20ff78e282..f29a8d6247 100644
--- a/ext/phar/tests/cache_list/copyonwrite4.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite4.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 4 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite4.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -12,4 +13,4 @@ files/write4.phar
bool(false)
bool(true)
string(2) "hi"
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite4a.phpt b/ext/phar/tests/cache_list/copyonwrite4a.phpt
index 1945e31f16..1b50c4204a 100644
--- a/ext/phar/tests/cache_list/copyonwrite4a.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite4a.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 4a [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite4.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE--
@@ -17,4 +18,4 @@ var_dump(file_exists('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.
bool(false)
bool(true)
string(2) "hi"
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/phar/tests/cache_list/copyonwrite5.phar.phpt b/ext/phar/tests/cache_list/copyonwrite5.phar.phpt
index 89990a7af1..6f48dfa63d 100644
--- a/ext/phar/tests/cache_list/copyonwrite5.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite5.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 5 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite5.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -24,4 +25,4 @@ array(2) {
phar://%scopyonwrite5.phar.php%cfile1 file1
phar://%scopyonwrite5.phar.php%cfile2 file2
phar://%scopyonwrite5.phar.php%chi hi
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite6.phar.phpt b/ext/phar/tests/cache_list/copyonwrite6.phar.phpt
index 661fef42c1..ceea8508bd 100644
--- a/ext/phar/tests/cache_list/copyonwrite6.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite6.phar.phpt
@@ -5,6 +5,7 @@ default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite6.phar.php
phar.readonly=0
open_basedir=
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (version_compare(PHP_VERSION, "5.3", "<")) die("skip PHP 5.3+ required"); ?>
diff --git a/ext/phar/tests/cache_list/copyonwrite7.phar.phpt b/ext/phar/tests/cache_list/copyonwrite7.phar.phpt
index d6faded9cc..57658dddd9 100644
--- a/ext/phar/tests/cache_list/copyonwrite7.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite7.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 7 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite7.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -11,4 +12,4 @@ files/write7.phar
--EXPECT--
bool(true)
bool(false)
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite8.phar.phpt b/ext/phar/tests/cache_list/copyonwrite8.phar.phpt
index 7217d336e2..71aa0b01be 100644
--- a/ext/phar/tests/cache_list/copyonwrite8.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite8.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 8 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite8.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -11,4 +12,4 @@ files/write8.phar
--EXPECTF--
string(%s) "%scopyonwrite8.phar.php"
hi
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/copyonwrite9.phar.phpt b/ext/phar/tests/cache_list/copyonwrite9.phar.phpt
index ffda9565bd..b2437776a1 100644
--- a/ext/phar/tests/cache_list/copyonwrite9.phar.phpt
+++ b/ext/phar/tests/cache_list/copyonwrite9.phar.phpt
@@ -4,6 +4,7 @@ Phar: copy-on-write test 9 [cache_list]
default_charset=UTF-8
phar.cache_list={PWD}/copyonwrite9.phar.php
phar.readonly=0
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -20,4 +21,4 @@ __HALT_COMPILER(); ?>
"
<?php __HALT_COMPILER(); ?>
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/cache_list/frontcontroller1.phpt b/ext/phar/tests/cache_list/frontcontroller1.phpt
index d0d5552f16..91a5c9ea7d 100644
--- a/ext/phar/tests/cache_list/frontcontroller1.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller1.phpt
@@ -2,6 +2,7 @@
Phar front controller other
--INI--
phar.cache_list={PWD}/frontcontroller1.php [cache_list]
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller10.phpt b/ext/phar/tests/cache_list/frontcontroller10.phpt
index 00177d4ff5..7c94da116c 100644
--- a/ext/phar/tests/cache_list/frontcontroller10.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller10.phpt
@@ -3,6 +3,7 @@ Phar front controller rewrite access denied [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller10.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller11.phpt b/ext/phar/tests/cache_list/frontcontroller11.phpt
index 25b147e194..e4912844de 100644
--- a/ext/phar/tests/cache_list/frontcontroller11.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller11.phpt
@@ -3,6 +3,7 @@ Phar front controller mime type extension is not a string [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller11.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php die("skip"); ?>
@@ -19,4 +20,4 @@ Fatal error: Uncaught exception 'PharException' with message 'Key of MIME type o
Stack trace:
#0 %sfrontcontroller11.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
#1 {main}
- thrown in %sfrontcontroller11.php on line 2 \ No newline at end of file
+ thrown in %sfrontcontroller11.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller12.phpt b/ext/phar/tests/cache_list/frontcontroller12.phpt
index cfc7d0e43a..c98a84027a 100644
--- a/ext/phar/tests/cache_list/frontcontroller12.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller12.phpt
@@ -3,6 +3,7 @@ Phar front controller mime type unknown int [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller12.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -18,4 +19,4 @@ Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type
Stack trace:
#0 %sfrontcontroller12.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
#1 {main}
- thrown in %sfrontcontroller12.php on line 2 \ No newline at end of file
+ thrown in %sfrontcontroller12.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller13.phpt b/ext/phar/tests/cache_list/frontcontroller13.phpt
index e6c9dee4ae..deb02c25db 100644
--- a/ext/phar/tests/cache_list/frontcontroller13.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller13.phpt
@@ -3,6 +3,7 @@ Phar front controller mime type not string/int [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller13.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -18,4 +19,4 @@ Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type
Stack trace:
#0 %sfrontcontroller13.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
#1 {main}
- thrown in %sfrontcontroller13.php on line 2 \ No newline at end of file
+ thrown in %sfrontcontroller13.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller14.phpt b/ext/phar/tests/cache_list/frontcontroller14.phpt
index bbd9637d24..bc214141f4 100644
--- a/ext/phar/tests/cache_list/frontcontroller14.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller14.phpt
@@ -2,6 +2,7 @@
Phar front controller mime type override, other [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller14.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller15.phpt b/ext/phar/tests/cache_list/frontcontroller15.phpt
index d142a5d742..22fed0af57 100644
--- a/ext/phar/tests/cache_list/frontcontroller15.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller15.phpt
@@ -3,6 +3,7 @@ Phar front controller mime type override, Phar::PHPS [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller15.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller16.phpt b/ext/phar/tests/cache_list/frontcontroller16.phpt
index 10bebdccef..4294c3d326 100644
--- a/ext/phar/tests/cache_list/frontcontroller16.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller16.phpt
@@ -3,6 +3,7 @@ Phar front controller mime type override, Phar::PHP [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller16.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller17.phpt b/ext/phar/tests/cache_list/frontcontroller17.phpt
index 35d3ae4e9c..47688e7b6a 100644
--- a/ext/phar/tests/cache_list/frontcontroller17.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller17.phpt
@@ -2,6 +2,7 @@
Phar front controller mime type unknown [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller17.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller18.phpt b/ext/phar/tests/cache_list/frontcontroller18.phpt
index 5e94bf6ff5..8982706e5f 100644
--- a/ext/phar/tests/cache_list/frontcontroller18.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller18.phpt
@@ -2,6 +2,7 @@
Phar front controller $_SERVER munging failure [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller18.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller19.phpt b/ext/phar/tests/cache_list/frontcontroller19.phpt
index bed0b1df31..0e5e8f1d07 100644
--- a/ext/phar/tests/cache_list/frontcontroller19.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller19.phpt
@@ -2,6 +2,7 @@
Phar front controller $_SERVER munging failure 2 [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller19.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller2.phpt b/ext/phar/tests/cache_list/frontcontroller2.phpt
index 67ccfc1e04..2cf18f823c 100644
--- a/ext/phar/tests/cache_list/frontcontroller2.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller2.phpt
@@ -3,6 +3,7 @@ Phar front controller PHP test [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list=frontcontroller2.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller20.phpt b/ext/phar/tests/cache_list/frontcontroller20.phpt
index bf333c773c..b5499b1ef5 100644
--- a/ext/phar/tests/cache_list/frontcontroller20.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller20.phpt
@@ -2,6 +2,7 @@
Phar front controller $_SERVER munging failure 3 [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller20.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller21.phpt b/ext/phar/tests/cache_list/frontcontroller21.phpt
index 829f2986e9..6d514891df 100644
--- a/ext/phar/tests/cache_list/frontcontroller21.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller21.phpt
@@ -3,6 +3,7 @@ Phar front controller $_SERVER munging success [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller21.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -22,4 +23,4 @@ string(18) "/index.php?test=hi"
string(32) "/frontcontroller21.php/index.php"
string(22) "/frontcontroller21.php"
string(%d) "%sfrontcontroller21.php"
-string(40) "/frontcontroller21.php/index.php?test=hi" \ No newline at end of file
+string(40) "/frontcontroller21.php/index.php?test=hi"
diff --git a/ext/phar/tests/cache_list/frontcontroller22.phpt b/ext/phar/tests/cache_list/frontcontroller22.phpt
index 2769b01f2f..3454e16239 100644
--- a/ext/phar/tests/cache_list/frontcontroller22.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller22.phpt
@@ -3,6 +3,7 @@ Phar front controller include from cwd test 1 [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller22.phpt
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -19,4 +20,4 @@ Content-type: text/html; charset=UTF-8
Warning: include(./hi.php): failed to open stream: No such file or directory in phar://%s/oof/test.php on line %d
-Warning: include(): Failed opening './hi.php' for inclusion (include_path='%s') in phar://%soof/test.php on line %d \ No newline at end of file
+Warning: include(): Failed opening './hi.php' for inclusion (include_path='%s') in phar://%soof/test.php on line %d
diff --git a/ext/phar/tests/cache_list/frontcontroller23.phpt b/ext/phar/tests/cache_list/frontcontroller23.phpt
index 3da9631dfb..6a053e694c 100644
--- a/ext/phar/tests/cache_list/frontcontroller23.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller23.phpt
@@ -3,6 +3,7 @@ Phar front controller with generic action router test [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller23.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -15,4 +16,4 @@ files/frontcontroller14.phar
Content-type: text/html; charset=UTF-8
--EXPECTF--
string(9) "/hi/there"
-string(%d) "phar://%sfrontcontroller23.php/html/index.php" \ No newline at end of file
+string(%d) "phar://%sfrontcontroller23.php/html/index.php"
diff --git a/ext/phar/tests/cache_list/frontcontroller24.phpt b/ext/phar/tests/cache_list/frontcontroller24.phpt
index 561826bd78..e8892a3dab 100644
--- a/ext/phar/tests/cache_list/frontcontroller24.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller24.phpt
@@ -3,6 +3,7 @@ Phar front controller with custom 404 php script [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller24.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -14,4 +15,4 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: text/html; charset=UTF-8
--EXPECTF--
-My 404 is rawesome \ No newline at end of file
+My 404 is rawesome
diff --git a/ext/phar/tests/cache_list/frontcontroller25.phpt b/ext/phar/tests/cache_list/frontcontroller25.phpt
index a8779392b6..2fdc23daad 100644
--- a/ext/phar/tests/cache_list/frontcontroller25.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller25.phpt
@@ -3,6 +3,7 @@ Phar front controller with extra path_info [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller25.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -15,4 +16,4 @@ files/frontcontroller8.phar
Content-type: text/html; charset=UTF-8
--EXPECTF--
string(42) "/frontcontroller25.php/a1.phps/extra/stuff"
-string(12) "/extra/stuff" \ No newline at end of file
+string(12) "/extra/stuff"
diff --git a/ext/phar/tests/cache_list/frontcontroller26.phpt b/ext/phar/tests/cache_list/frontcontroller26.phpt
index 86a1c1444c..dc3bdf8bc3 100644
--- a/ext/phar/tests/cache_list/frontcontroller26.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller26.phpt
@@ -2,6 +2,7 @@
Phar front controller with unknown extension mime type [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller26.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -13,4 +14,4 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: application/octet-stream
--EXPECTF--
-<?php var_dump("hi"); \ No newline at end of file
+<?php var_dump("hi");
diff --git a/ext/phar/tests/cache_list/frontcontroller27.phpt b/ext/phar/tests/cache_list/frontcontroller27.phpt
index 4a76e02eae..87e8050e2f 100644
--- a/ext/phar/tests/cache_list/frontcontroller27.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller27.phpt
@@ -3,6 +3,7 @@ Phar front controller with no extension [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller27.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -14,4 +15,4 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: text/plain;charset=UTF-8
--EXPECTF--
-hi \ No newline at end of file
+hi
diff --git a/ext/phar/tests/cache_list/frontcontroller28.phpt b/ext/phar/tests/cache_list/frontcontroller28.phpt
index 80059a9da2..ea76bb21f6 100644
--- a/ext/phar/tests/cache_list/frontcontroller28.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller28.phpt
@@ -3,6 +3,7 @@ Phar front controller with huge file [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller28.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller29.phpt b/ext/phar/tests/cache_list/frontcontroller29.phpt
index 1cd8f96f2d..5a5dacff52 100644
--- a/ext/phar/tests/cache_list/frontcontroller29.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller29.phpt
@@ -3,6 +3,7 @@ Phar front controller with fatal error in php file [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller29.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -14,4 +15,4 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: text/html; charset=UTF-8
--EXPECTF--
-Fatal error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps on line 1 \ No newline at end of file
+Fatal error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps on line 1
diff --git a/ext/phar/tests/cache_list/frontcontroller3.phpt b/ext/phar/tests/cache_list/frontcontroller3.phpt
index 1c1b479881..f5651e2d78 100644
--- a/ext/phar/tests/cache_list/frontcontroller3.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller3.phpt
@@ -3,6 +3,7 @@ Phar front controller phps [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller3.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller30.phpt b/ext/phar/tests/cache_list/frontcontroller30.phpt
index 5a63da874c..ca92c72880 100644
--- a/ext/phar/tests/cache_list/frontcontroller30.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller30.phpt
@@ -2,6 +2,7 @@
Phar front controller with weird SCRIPT_NAME [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller30.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -11,4 +12,4 @@ REQUEST_URI=/huh?
files/frontcontroller8.phar
--EXPECTF--
oops did not run
-%a \ No newline at end of file
+%a
diff --git a/ext/phar/tests/cache_list/frontcontroller31.phpt b/ext/phar/tests/cache_list/frontcontroller31.phpt
index 9ef1221a28..966ca1a40c 100644
--- a/ext/phar/tests/cache_list/frontcontroller31.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller31.phpt
@@ -3,6 +3,7 @@ Phar front controller with invalid callback for rewrites [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller31.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -13,4 +14,4 @@ Content-type: text/html; charset=UTF-8
--FILE_EXTERNAL--
files/frontcontroller16.phar
--EXPECT--
-phar error: invalid rewrite callback \ No newline at end of file
+phar error: invalid rewrite callback
diff --git a/ext/phar/tests/cache_list/frontcontroller32.phpt b/ext/phar/tests/cache_list/frontcontroller32.phpt
index 59116907a5..49cb062e54 100644
--- a/ext/phar/tests/cache_list/frontcontroller32.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller32.phpt
@@ -3,6 +3,7 @@ Phar front controller with valid callback that is not good [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller32.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -13,4 +14,4 @@ Content-type: text/html; charset=UTF-8
--FILE_EXTERNAL--
files/frontcontroller17.phar
--EXPECTF--
-%ahar error: failed to call rewrite callback \ No newline at end of file
+%ahar error: failed to call rewrite callback
diff --git a/ext/phar/tests/cache_list/frontcontroller33.phpt b/ext/phar/tests/cache_list/frontcontroller33.phpt
index 9573854823..34244d844e 100644
--- a/ext/phar/tests/cache_list/frontcontroller33.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller33.phpt
@@ -3,6 +3,7 @@ Phar front controller with valid callback that does not return any value [cache_
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller33.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -13,4 +14,4 @@ Content-type: text/html; charset=UTF-8
--FILE_EXTERNAL--
files/frontcontroller18.phar
--EXPECTF--
-phar error: rewrite callback must return a string or false \ No newline at end of file
+phar error: rewrite callback must return a string or false
diff --git a/ext/phar/tests/cache_list/frontcontroller34.phpt b/ext/phar/tests/cache_list/frontcontroller34.phpt
index 83c22f58f8..f6677cc04b 100644
--- a/ext/phar/tests/cache_list/frontcontroller34.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller34.phpt
@@ -3,6 +3,7 @@ Phar front controller with cwd [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller34.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller4.phpt b/ext/phar/tests/cache_list/frontcontroller4.phpt
index 5cf3682277..16961a1e46 100644
--- a/ext/phar/tests/cache_list/frontcontroller4.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller4.phpt
@@ -2,6 +2,7 @@
Phar front controller index.php relocate (no /) [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller4.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller5.phpt b/ext/phar/tests/cache_list/frontcontroller5.phpt
index 2c738d7bfb..93ea37a9af 100644
--- a/ext/phar/tests/cache_list/frontcontroller5.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller5.phpt
@@ -2,6 +2,7 @@
Phar front controller index.php relocate [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller5.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller6.phpt b/ext/phar/tests/cache_list/frontcontroller6.phpt
index 2480be4129..d498072fa2 100644
--- a/ext/phar/tests/cache_list/frontcontroller6.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller6.phpt
@@ -2,6 +2,7 @@
Phar front controller 404 [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller6.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -20,4 +21,4 @@ Status: 404 Not Found
<body>
<h1>404 - File /notfound.php Not Found</h1>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/ext/phar/tests/cache_list/frontcontroller7.phpt b/ext/phar/tests/cache_list/frontcontroller7.phpt
index a8a88a95fe..c4d5514ade 100644
--- a/ext/phar/tests/cache_list/frontcontroller7.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller7.phpt
@@ -2,6 +2,7 @@
Phar front controller alternate index file [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller7.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/cache_list/frontcontroller8.phpt b/ext/phar/tests/cache_list/frontcontroller8.phpt
index bf9b390def..bc6829cba5 100644
--- a/ext/phar/tests/cache_list/frontcontroller8.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller8.phpt
@@ -2,6 +2,7 @@
Phar front controller no index file 404 [cache_list]
--INI--
phar.cache_list={PWD}/frontcontroller8.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -20,4 +21,4 @@ Status: 404 Not Found
<body>
<h1>404 - File /index.php Not Found</h1>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/ext/phar/tests/cache_list/frontcontroller9.phpt b/ext/phar/tests/cache_list/frontcontroller9.phpt
index 1a8b9168cc..fb6f72ac22 100644
--- a/ext/phar/tests/cache_list/frontcontroller9.phpt
+++ b/ext/phar/tests/cache_list/frontcontroller9.phpt
@@ -3,6 +3,7 @@ Phar front controller rewrite array [cache_list]
--INI--
default_charset=UTF-8
phar.cache_list={PWD}/frontcontroller9.php
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -17,4 +18,4 @@ Content-type: text/html; charset=UTF-8
<code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
</span>
-</code> \ No newline at end of file
+</code>
diff --git a/ext/phar/tests/delete.phpt b/ext/phar/tests/delete.phpt
index 1d98509064..f91b11b3d5 100644
--- a/ext/phar/tests/delete.phpt
+++ b/ext/phar/tests/delete.phpt
@@ -5,6 +5,7 @@ Phar: delete test
--INI--
phar.readonly=0
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -28,4 +29,4 @@ echo file_get_contents($pname . '/a') . "\n";
--EXPECTF--
a
-Warning: file_get_contents(phar://%sdelete.phar.php/a): failed to open stream: phar error: "a" is not a file in phar "%sdelete.phar.php" in %sdelete.php on line 16 \ No newline at end of file
+Warning: file_get_contents(phar://%sdelete.phar.php/a): failed to open stream: phar error: "a" is not a file in phar "%sdelete.phar.php" in %sdelete.php on line 16
diff --git a/ext/phar/tests/fatal_error_webphar.phpt b/ext/phar/tests/fatal_error_webphar.phpt
index 80efaa9ed1..36b3fba122 100644
--- a/ext/phar/tests/fatal_error_webphar.phpt
+++ b/ext/phar/tests/fatal_error_webphar.phpt
@@ -2,6 +2,7 @@
Phar web-based phar with fatal error
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -15,4 +16,4 @@ Content-type: text/html; charset=UTF-8
--EXPECTF--
string(9) "\Web\View"
-Parse error: syntax error, unexpected T_ECHO, expecting T_FUNCTION in phar://%sfatal_error_webphar.php/Web/View.php on line 380 \ No newline at end of file
+Parse error: syntax error, unexpected T_ECHO, expecting T_FUNCTION in phar://%sfatal_error_webphar.php/Web/View.php on line 380
diff --git a/ext/phar/tests/file_get_contents.phpt b/ext/phar/tests/file_get_contents.phpt
index fcc9d64655..b931176e50 100644
--- a/ext/phar/tests/file_get_contents.phpt
+++ b/ext/phar/tests/file_get_contents.phpt
@@ -5,6 +5,7 @@ Phar: test file_get_contents() interception
--INI--
phar.require_hash=1
phar.readonly=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -27,4 +28,4 @@ include $fname;
--CLEAN--
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
--EXPECT--
-hihi===DONE=== \ No newline at end of file
+hihi===DONE===
diff --git a/ext/phar/tests/fopen.phpt b/ext/phar/tests/fopen.phpt
index 5b694d6e2d..b10bcb3a53 100644
--- a/ext/phar/tests/fopen.phpt
+++ b/ext/phar/tests/fopen.phpt
@@ -6,6 +6,7 @@ Phar: test fopen() interception
--INI--
phar.require_hash=1
phar.readonly=0
+detect_unicode=0
--FILE--
<?php
Phar::interceptFileFuncs();
@@ -40,4 +41,4 @@ include $fname;
Warning: fopen() expects at least 2 parameters, 0 given in %sfopen.php on line %d
hihi
Warning: fopen(notfound.txt): failed to open stream: No such file or directory in phar://%sfopen.phar.php/index.php on line %d
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/phar/tests/front.phar.phpt b/ext/phar/tests/front.phar.phpt
index bab8ada0fd..4009b491f5 100644
--- a/ext/phar/tests/front.phar.phpt
+++ b/ext/phar/tests/front.phar.phpt
@@ -2,6 +2,7 @@
Phar front controller with mounted external file
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/frontcontroller1.phpt b/ext/phar/tests/frontcontroller1.phpt
index 7093323617..0186b12529 100644
--- a/ext/phar/tests/frontcontroller1.phpt
+++ b/ext/phar/tests/frontcontroller1.phpt
@@ -2,6 +2,8 @@
Phar front controller other
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller1.php
REQUEST_URI=/frontcontroller1.php/a.jpg
diff --git a/ext/phar/tests/frontcontroller10.phpt b/ext/phar/tests/frontcontroller10.phpt
index 667d5c243c..b6a0b488f6 100644
--- a/ext/phar/tests/frontcontroller10.phpt
+++ b/ext/phar/tests/frontcontroller10.phpt
@@ -2,6 +2,7 @@
Phar front controller rewrite access denied
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/frontcontroller12.phpt b/ext/phar/tests/frontcontroller12.phpt
index 956ea1c050..b85b2f716b 100644
--- a/ext/phar/tests/frontcontroller12.phpt
+++ b/ext/phar/tests/frontcontroller12.phpt
@@ -2,6 +2,7 @@
Phar front controller mime type unknown int
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -17,4 +18,4 @@ Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type
Stack trace:
#0 %sfrontcontroller12.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
#1 {main}
- thrown in %sfrontcontroller12.php on line 2 \ No newline at end of file
+ thrown in %sfrontcontroller12.php on line 2
diff --git a/ext/phar/tests/frontcontroller13.phpt b/ext/phar/tests/frontcontroller13.phpt
index 717e56996f..cde41f7cdd 100644
--- a/ext/phar/tests/frontcontroller13.phpt
+++ b/ext/phar/tests/frontcontroller13.phpt
@@ -2,6 +2,7 @@
Phar front controller mime type not string/int
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -17,4 +18,4 @@ Fatal error: Uncaught exception 'PharException' with message 'Unknown mime type
Stack trace:
#0 %sfrontcontroller13.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
#1 {main}
- thrown in %sfrontcontroller13.php on line 2 \ No newline at end of file
+ thrown in %sfrontcontroller13.php on line 2
diff --git a/ext/phar/tests/frontcontroller14.phpt b/ext/phar/tests/frontcontroller14.phpt
index 2bdb145c6e..13de43f426 100644
--- a/ext/phar/tests/frontcontroller14.phpt
+++ b/ext/phar/tests/frontcontroller14.phpt
@@ -2,6 +2,8 @@
Phar front controller mime type override, other
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller14.php
REQUEST_URI=/frontcontroller14.php/a.jpg
diff --git a/ext/phar/tests/frontcontroller15.phpt b/ext/phar/tests/frontcontroller15.phpt
index 370098014d..8dbf144618 100644
--- a/ext/phar/tests/frontcontroller15.phpt
+++ b/ext/phar/tests/frontcontroller15.phpt
@@ -2,6 +2,7 @@
Phar front controller mime type override, Phar::PHPS
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/frontcontroller16.phpt b/ext/phar/tests/frontcontroller16.phpt
index 712af40bf3..8b0499b4b4 100644
--- a/ext/phar/tests/frontcontroller16.phpt
+++ b/ext/phar/tests/frontcontroller16.phpt
@@ -2,6 +2,7 @@
Phar front controller mime type override, Phar::PHP
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/frontcontroller17.phpt b/ext/phar/tests/frontcontroller17.phpt
index 233e2e2a49..ce8cda4642 100644
--- a/ext/phar/tests/frontcontroller17.phpt
+++ b/ext/phar/tests/frontcontroller17.phpt
@@ -2,6 +2,8 @@
Phar front controller mime type unknown
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller17.php
REQUEST_URI=/frontcontroller17.php/fronk.gronk
diff --git a/ext/phar/tests/frontcontroller18.phpt b/ext/phar/tests/frontcontroller18.phpt
index 19aea45563..3d867070ab 100644
--- a/ext/phar/tests/frontcontroller18.phpt
+++ b/ext/phar/tests/frontcontroller18.phpt
@@ -2,6 +2,8 @@
Phar front controller $_SERVER munging failure
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller18.php
REQUEST_URI=/frontcontroller18.php/fronk.gronk
diff --git a/ext/phar/tests/frontcontroller19.phpt b/ext/phar/tests/frontcontroller19.phpt
index 9adafa2b30..8c72e47056 100644
--- a/ext/phar/tests/frontcontroller19.phpt
+++ b/ext/phar/tests/frontcontroller19.phpt
@@ -2,6 +2,8 @@
Phar front controller $_SERVER munging failure 2
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller19.php
REQUEST_URI=/frontcontroller19.php/
diff --git a/ext/phar/tests/frontcontroller2.phpt b/ext/phar/tests/frontcontroller2.phpt
index d0744dea1d..987a04ea99 100644
--- a/ext/phar/tests/frontcontroller2.phpt
+++ b/ext/phar/tests/frontcontroller2.phpt
@@ -2,6 +2,7 @@
Phar front controller PHP test
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/frontcontroller20.phpt b/ext/phar/tests/frontcontroller20.phpt
index 45e2bfc25e..bf87cd9688 100644
--- a/ext/phar/tests/frontcontroller20.phpt
+++ b/ext/phar/tests/frontcontroller20.phpt
@@ -2,6 +2,8 @@
Phar front controller $_SERVER munging failure 3
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller20.php
REQUEST_URI=/frontcontroller20.php/
diff --git a/ext/phar/tests/frontcontroller21.phpt b/ext/phar/tests/frontcontroller21.phpt
index bf50c6e801..1c61ceb602 100644
--- a/ext/phar/tests/frontcontroller21.phpt
+++ b/ext/phar/tests/frontcontroller21.phpt
@@ -2,6 +2,7 @@
Phar front controller $_SERVER munging success
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -21,4 +22,4 @@ string(18) "/index.php?test=hi"
string(32) "/frontcontroller21.php/index.php"
string(22) "/frontcontroller21.php"
string(%d) "%sfrontcontroller21.php"
-string(40) "/frontcontroller21.php/index.php?test=hi" \ No newline at end of file
+string(40) "/frontcontroller21.php/index.php?test=hi"
diff --git a/ext/phar/tests/frontcontroller22.phpt b/ext/phar/tests/frontcontroller22.phpt
index b85c1eb497..f19c88b595 100644
--- a/ext/phar/tests/frontcontroller22.phpt
+++ b/ext/phar/tests/frontcontroller22.phpt
@@ -2,6 +2,7 @@
Phar front controller include from cwd test 1
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -18,4 +19,4 @@ Content-type: text/html; charset=UTF-8
Warning: include(./hi.php): failed to open stream: No such file or directory in phar://%s/oof/test.php on line %d
-Warning: include(): Failed opening './hi.php' for inclusion (include_path='%s') in phar://%soof/test.php on line %d \ No newline at end of file
+Warning: include(): Failed opening './hi.php' for inclusion (include_path='%s') in phar://%soof/test.php on line %d
diff --git a/ext/phar/tests/frontcontroller23.phpt b/ext/phar/tests/frontcontroller23.phpt
index 24464c9beb..4a676028b2 100644
--- a/ext/phar/tests/frontcontroller23.phpt
+++ b/ext/phar/tests/frontcontroller23.phpt
@@ -2,6 +2,7 @@
Phar front controller with generic action router test
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -14,4 +15,4 @@ files/frontcontroller14.phar
Content-type: text/html; charset=UTF-8
--EXPECTF--
string(9) "/hi/there"
-string(%d) "phar://%sfrontcontroller23.php/html/index.php" \ No newline at end of file
+string(%d) "phar://%sfrontcontroller23.php/html/index.php"
diff --git a/ext/phar/tests/frontcontroller24.phpt b/ext/phar/tests/frontcontroller24.phpt
index 767971ee91..8d60ce2f7c 100644
--- a/ext/phar/tests/frontcontroller24.phpt
+++ b/ext/phar/tests/frontcontroller24.phpt
@@ -2,6 +2,7 @@
Phar front controller with custom 404 php script
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -13,4 +14,4 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: text/html; charset=UTF-8
--EXPECTF--
-My 404 is rawesome \ No newline at end of file
+My 404 is rawesome
diff --git a/ext/phar/tests/frontcontroller25.phpt b/ext/phar/tests/frontcontroller25.phpt
index 9b383de413..da4e58b49a 100644
--- a/ext/phar/tests/frontcontroller25.phpt
+++ b/ext/phar/tests/frontcontroller25.phpt
@@ -2,6 +2,7 @@
Phar front controller with extra path_info
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -14,4 +15,4 @@ files/frontcontroller8.phar
Content-type: text/html; charset=UTF-8
--EXPECTF--
string(42) "/frontcontroller25.php/a1.phps/extra/stuff"
-string(12) "/extra/stuff" \ No newline at end of file
+string(12) "/extra/stuff"
diff --git a/ext/phar/tests/frontcontroller26.phpt b/ext/phar/tests/frontcontroller26.phpt
index a8097b0886..9c5a14d512 100644
--- a/ext/phar/tests/frontcontroller26.phpt
+++ b/ext/phar/tests/frontcontroller26.phpt
@@ -2,6 +2,8 @@
Phar front controller with unknown extension mime type
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller26.php
REQUEST_URI=/frontcontroller26.php/unknown.ext
@@ -11,4 +13,4 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: application/octet-stream
--EXPECTF--
-<?php var_dump("hi"); \ No newline at end of file
+<?php var_dump("hi");
diff --git a/ext/phar/tests/frontcontroller27.phpt b/ext/phar/tests/frontcontroller27.phpt
index 16203f6feb..f12d7f4538 100644
--- a/ext/phar/tests/frontcontroller27.phpt
+++ b/ext/phar/tests/frontcontroller27.phpt
@@ -2,6 +2,7 @@
Phar front controller with no extension
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -13,4 +14,4 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: text/plain;charset=UTF-8
--EXPECTF--
-hi \ No newline at end of file
+hi
diff --git a/ext/phar/tests/frontcontroller28.phpt b/ext/phar/tests/frontcontroller28.phpt
index 577800885b..5871f327a2 100644
--- a/ext/phar/tests/frontcontroller28.phpt
+++ b/ext/phar/tests/frontcontroller28.phpt
@@ -2,6 +2,7 @@
Phar front controller with huge file
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/frontcontroller29.phpt b/ext/phar/tests/frontcontroller29.phpt
index 0afc17929f..61f9b1bfc1 100644
--- a/ext/phar/tests/frontcontroller29.phpt
+++ b/ext/phar/tests/frontcontroller29.phpt
@@ -2,6 +2,7 @@
Phar front controller with fatal error in php file
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -13,4 +14,4 @@ files/frontcontroller8.phar
--EXPECTHEADERS--
Content-type: text/html; charset=UTF-8
--EXPECTF--
-Fatal error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps on line 1 \ No newline at end of file
+Fatal error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps on line 1
diff --git a/ext/phar/tests/frontcontroller3.phpt b/ext/phar/tests/frontcontroller3.phpt
index ac36485837..6d025aec29 100644
--- a/ext/phar/tests/frontcontroller3.phpt
+++ b/ext/phar/tests/frontcontroller3.phpt
@@ -2,6 +2,7 @@
Phar front controller phps
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/frontcontroller30.phpt b/ext/phar/tests/frontcontroller30.phpt
index de6960c244..9b38bccd4f 100644
--- a/ext/phar/tests/frontcontroller30.phpt
+++ b/ext/phar/tests/frontcontroller30.phpt
@@ -2,6 +2,8 @@
Phar front controller with weird SCRIPT_NAME
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/huh?
REQUEST_URI=/huh?
@@ -9,4 +11,4 @@ REQUEST_URI=/huh?
files/frontcontroller8.phar
--EXPECTF--
oops did not run
-%a \ No newline at end of file
+%a
diff --git a/ext/phar/tests/frontcontroller31.phpt b/ext/phar/tests/frontcontroller31.phpt
index 13c305d2f3..4995da74ef 100644
--- a/ext/phar/tests/frontcontroller31.phpt
+++ b/ext/phar/tests/frontcontroller31.phpt
@@ -2,6 +2,7 @@
Phar front controller with invalid callback for rewrites
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -12,4 +13,4 @@ Content-type: text/html; charset=UTF-8
--FILE_EXTERNAL--
files/frontcontroller16.phar
--EXPECT--
-phar error: invalid rewrite callback \ No newline at end of file
+phar error: invalid rewrite callback
diff --git a/ext/phar/tests/frontcontroller32.phpt b/ext/phar/tests/frontcontroller32.phpt
index 58f6fffa00..2459312dc5 100644
--- a/ext/phar/tests/frontcontroller32.phpt
+++ b/ext/phar/tests/frontcontroller32.phpt
@@ -2,6 +2,7 @@
Phar front controller with valid callback that is not good
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -12,4 +13,4 @@ Content-type: text/html; charset=UTF-8
--FILE_EXTERNAL--
files/frontcontroller17.phar
--EXPECTF--
-%ahar error: failed to call rewrite callback \ No newline at end of file
+%ahar error: failed to call rewrite callback
diff --git a/ext/phar/tests/frontcontroller33.phpt b/ext/phar/tests/frontcontroller33.phpt
index 8593e31766..58611080da 100644
--- a/ext/phar/tests/frontcontroller33.phpt
+++ b/ext/phar/tests/frontcontroller33.phpt
@@ -2,6 +2,7 @@
Phar front controller with valid callback that does not return any value
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -12,4 +13,4 @@ Content-type: text/html; charset=UTF-8
--FILE_EXTERNAL--
files/frontcontroller18.phar
--EXPECTF--
-phar error: rewrite callback must return a string or false \ No newline at end of file
+phar error: rewrite callback must return a string or false
diff --git a/ext/phar/tests/frontcontroller34.phpt b/ext/phar/tests/frontcontroller34.phpt
index 34a49ded4d..bf1cf7f244 100644
--- a/ext/phar/tests/frontcontroller34.phpt
+++ b/ext/phar/tests/frontcontroller34.phpt
@@ -2,6 +2,7 @@
Phar front controller with cwd
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
diff --git a/ext/phar/tests/frontcontroller4.phpt b/ext/phar/tests/frontcontroller4.phpt
index f2482b9219..d1cb2a4c63 100644
--- a/ext/phar/tests/frontcontroller4.phpt
+++ b/ext/phar/tests/frontcontroller4.phpt
@@ -2,6 +2,8 @@
Phar front controller index.php relocate (no /)
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller4.php
REQUEST_URI=/frontcontroller4.php
diff --git a/ext/phar/tests/frontcontroller5.phpt b/ext/phar/tests/frontcontroller5.phpt
index 1990a2b008..48771efc8f 100644
--- a/ext/phar/tests/frontcontroller5.phpt
+++ b/ext/phar/tests/frontcontroller5.phpt
@@ -2,6 +2,8 @@
Phar front controller index.php relocate
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller5.php
REQUEST_URI=/frontcontroller5.php/
diff --git a/ext/phar/tests/frontcontroller6.phpt b/ext/phar/tests/frontcontroller6.phpt
index 1a2cc2cd23..1ab4e20032 100644
--- a/ext/phar/tests/frontcontroller6.phpt
+++ b/ext/phar/tests/frontcontroller6.phpt
@@ -2,6 +2,8 @@
Phar front controller 404
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller6.php
REQUEST_URI=/frontcontroller6.php/notfound.php
@@ -18,4 +20,4 @@ Status: 404 Not Found
<body>
<h1>404 - File /notfound.php Not Found</h1>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/ext/phar/tests/frontcontroller7.phpt b/ext/phar/tests/frontcontroller7.phpt
index aff2087522..c30a366e37 100644
--- a/ext/phar/tests/frontcontroller7.phpt
+++ b/ext/phar/tests/frontcontroller7.phpt
@@ -2,6 +2,8 @@
Phar front controller alternate index file
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller7.php
REQUEST_URI=/frontcontroller7.php/
diff --git a/ext/phar/tests/frontcontroller8.phpt b/ext/phar/tests/frontcontroller8.phpt
index 36e3206d66..88312c4061 100644
--- a/ext/phar/tests/frontcontroller8.phpt
+++ b/ext/phar/tests/frontcontroller8.phpt
@@ -2,6 +2,8 @@
Phar front controller no index file 404
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--ENV--
SCRIPT_NAME=/frontcontroller8.php
REQUEST_URI=/frontcontroller8.php/
@@ -18,4 +20,4 @@ Status: 404 Not Found
<body>
<h1>404 - File /index.php Not Found</h1>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/ext/phar/tests/frontcontroller9.phpt b/ext/phar/tests/frontcontroller9.phpt
index d47a2898e6..36cf2713cb 100644
--- a/ext/phar/tests/frontcontroller9.phpt
+++ b/ext/phar/tests/frontcontroller9.phpt
@@ -2,6 +2,7 @@
Phar front controller rewrite array
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--ENV--
@@ -16,4 +17,4 @@ Content-type: text/html; charset=UTF-8
<code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">hio</span><span style="color: #007700">(){}</span>
</span>
-</code> \ No newline at end of file
+</code>
diff --git a/ext/phar/tests/include_path_advanced.phpt b/ext/phar/tests/include_path_advanced.phpt
index 6feee422b4..81e528130c 100644
--- a/ext/phar/tests/include_path_advanced.phpt
+++ b/ext/phar/tests/include_path_advanced.phpt
@@ -2,6 +2,7 @@
Phar: include_path advanced code coverage test
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE_EXTERNAL--
@@ -9,4 +10,4 @@ files/include_path.phar
--EXPECT--
file1.php
test/file1.php
-ok \ No newline at end of file
+ok
diff --git a/ext/phar/tests/mounteddir.phpt b/ext/phar/tests/mounteddir.phpt
index e1308956fe..b9bf58922f 100644
--- a/ext/phar/tests/mounteddir.phpt
+++ b/ext/phar/tests/mounteddir.phpt
@@ -7,6 +7,7 @@ if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of P
?>
--INI--
phar.readonly=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/tempmanifest1.phar.php';
diff --git a/ext/phar/tests/opendir.phpt b/ext/phar/tests/opendir.phpt
index ca6e391b06..e8253bbc33 100644
--- a/ext/phar/tests/opendir.phpt
+++ b/ext/phar/tests/opendir.phpt
@@ -5,6 +5,7 @@ Phar: test opendir() interception
--INI--
phar.require_hash=1
phar.readonly=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -41,4 +42,4 @@ phar url "phar://" is unknown in %sopendir.php on line %d
Warning: opendir(phar://hi.phar): failed to open dir: phar error: invalid url or non-existent phar "phar://hi.phar"
phar url "phar://hi.phar" is unknown in %sopendir.php on line %d
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/phar/tests/phar_gzip.phpt b/ext/phar/tests/phar_gzip.phpt
index c722834ba6..472a9a2d24 100644
--- a/ext/phar/tests/phar_gzip.phpt
+++ b/ext/phar/tests/phar_gzip.phpt
@@ -11,6 +11,7 @@ if (version_compare(phpversion(), '5.2.6', '<')) die("skip zlib is buggy in PHP
--INI--
phar.readonly=0
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/phar_gzip.phar';
@@ -59,4 +60,4 @@ string(9) "it worked"
string(%d) "phar://%sphar_gzip.phar/tar_004.php"
bool(true)
bool(true)
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/phar/tests/phar_magic.phpt b/ext/phar/tests/phar_magic.phpt
index 7c60589f9f..3663d6e635 100644
--- a/ext/phar/tests/phar_magic.phpt
+++ b/ext/phar/tests/phar_magic.phpt
@@ -5,6 +5,7 @@ Phar: include/fopen magic
--INI--
phar.require_hash=0
phar.readonly=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
diff --git a/ext/phar/tests/phar_mount.phpt b/ext/phar/tests/phar_mount.phpt
index 80f8cda389..903e4a7bd6 100644
--- a/ext/phar/tests/phar_mount.phpt
+++ b/ext/phar/tests/phar_mount.phpt
@@ -4,6 +4,7 @@ Phar: Phar::mount
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.readonly=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -60,4 +61,4 @@ Mounting of testit to %sphar_mount.php within phar %sphar_mount.phar.tar failed
Mounting of /oops to /home/oops/../../etc/passwd: within phar %sphar_mount.phar.php failed
<?php
$fname = dirname(__FILE__) . '/' . basename(
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/phar/tests/phpinfo_003.phpt b/ext/phar/tests/phpinfo_003.phpt
index 031d3cf497..045f1a090d 100644
--- a/ext/phar/tests/phpinfo_003.phpt
+++ b/ext/phar/tests/phpinfo_003.phpt
@@ -24,7 +24,7 @@ Phar
Phar: PHP Archive support => enabled
Phar EXT version => %s
Phar API version => 1.1.1
-SVN revision => %cRevision: %s $
+SVN revision => %cId: %s $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
diff --git a/ext/phar/tests/readfile.phpt b/ext/phar/tests/readfile.phpt
index 60fdad1792..ced02b1ae9 100644
--- a/ext/phar/tests/readfile.phpt
+++ b/ext/phar/tests/readfile.phpt
@@ -5,6 +5,7 @@ Phar: test readfile() interception
--INI--
phar.require_hash=1
phar.readonly=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -27,4 +28,4 @@ include $fname;
--CLEAN--
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
--EXPECT--
-hihi===DONE=== \ No newline at end of file
+hihi===DONE===
diff --git a/ext/phar/tests/rename.phpt b/ext/phar/tests/rename.phpt
index c73c98ec81..2f12540589 100644
--- a/ext/phar/tests/rename.phpt
+++ b/ext/phar/tests/rename.phpt
@@ -5,6 +5,7 @@ Phar: rename test
--INI--
phar.readonly=0
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -29,4 +30,4 @@ echo file_get_contents($pname . '/a') . "\n";
a
a
-Warning: file_get_contents(phar://%srename.phar.php/a): failed to open stream: phar error: "a" is not a file in phar "%srename.phar.php" in %srename.php on line %d \ No newline at end of file
+Warning: file_get_contents(phar://%srename.phar.php/a): failed to open stream: phar error: "a" is not a file in phar "%srename.phar.php" in %srename.php on line %d
diff --git a/ext/phar/tests/rename_dir.phpt b/ext/phar/tests/rename_dir.phpt
index d19a37f70f..f2d11dc947 100644
--- a/ext/phar/tests/rename_dir.phpt
+++ b/ext/phar/tests/rename_dir.phpt
@@ -5,6 +5,7 @@ Phar: rename_dir test
--INI--
phar.readonly=0
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
diff --git a/ext/phar/tests/rename_dir_and_mount.phpt b/ext/phar/tests/rename_dir_and_mount.phpt
index b74f47b91d..3a4df6283b 100755
--- a/ext/phar/tests/rename_dir_and_mount.phpt
+++ b/ext/phar/tests/rename_dir_and_mount.phpt
@@ -5,6 +5,7 @@ Phar: rename_dir and mount test
--INI--
phar.readonly=0
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
diff --git a/ext/phar/tests/rmdir.phpt b/ext/phar/tests/rmdir.phpt
index 726e2cfbac..ffbe1563dc 100644
--- a/ext/phar/tests/rmdir.phpt
+++ b/ext/phar/tests/rmdir.phpt
@@ -5,6 +5,7 @@ Phar: rmdir test
--INI--
phar.readonly=0
phar.require_hash=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
diff --git a/ext/phar/tests/security.phpt b/ext/phar/tests/security.phpt
index f2944da413..0867cb42f7 100644
--- a/ext/phar/tests/security.phpt
+++ b/ext/phar/tests/security.phpt
@@ -4,6 +4,7 @@ Phar: test to ensure phar.readonly cannot be circumvented
<?php if (!extension_loaded("phar")) die("skip");?>
--INI--
phar.readonly=0
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
@@ -33,4 +34,4 @@ include $fname2;
--EXPECT--
bool(false)
Write operations disabled by the php.ini setting phar.readonly
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/phar/tests/stat.phpt b/ext/phar/tests/stat.phpt
index 184aa6d2ec..a3c8491aee 100644
--- a/ext/phar/tests/stat.phpt
+++ b/ext/phar/tests/stat.phpt
@@ -5,6 +5,7 @@ Phar: test stat function interceptions
--INI--
phar.require_hash=1
phar.readonly=0
+detect_unicode=0
--FILE--
<?php
Phar::interceptFileFuncs();
@@ -222,4 +223,4 @@ not found 2
Warning: fileperms(): stat failed for not/found in phar://%sstat.phar.php/my/index.php on line %d
bool(false)
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/phar/tests/withphar.phpt b/ext/phar/tests/withphar.phpt
index c422fa9843..b1af0eee51 100644
--- a/ext/phar/tests/withphar.phpt
+++ b/ext/phar/tests/withphar.phpt
@@ -2,6 +2,8 @@
Phar: phar run with pecl/phar with default stub
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+detect_unicode=0
--FILE--
<?php
include dirname(__FILE__) . '/files/nophar.phar';
diff --git a/ext/phar/tests/withphar_web.phpt b/ext/phar/tests/withphar_web.phpt
index 487873a134..a3dbfd92e3 100644
--- a/ext/phar/tests/withphar_web.phpt
+++ b/ext/phar/tests/withphar_web.phpt
@@ -2,8 +2,10 @@
Phar: default web stub, with phar extension
--INI--
default_charset=UTF-8
+detect_unicode=0
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip");?>
+detect_unicode=0
--ENV--
SCRIPT_NAME=/withphar_web.php
REQUEST_URI=/withphar_web.php/web.php
diff --git a/ext/phar/tests/zip/notphar.phpt b/ext/phar/tests/zip/notphar.phpt
index 3450c84bbd..c0648c4953 100644
--- a/ext/phar/tests/zip/notphar.phpt
+++ b/ext/phar/tests/zip/notphar.phpt
@@ -4,6 +4,7 @@ Phar: a non-executable zip with no stub named .phar.zip
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.readonly=1
+detect_unicode=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
diff --git a/ext/phar/util.c b/ext/phar/util.c
index 9797ec8250..cc4457493b 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -211,8 +211,6 @@ int phar_mount_entry(phar_archive_data *phar, char *filename, int filename_len,
return FAILURE;
}
#endif
-
- filename_len = strlen(entry.tmp);
filename = entry.tmp;
/* only check openbasedir for files, not for phar streams */
diff --git a/ext/phar/zip.c b/ext/phar/zip.c
index ced975cb38..3372622552 100644
--- a/ext/phar/zip.c
+++ b/ext/phar/zip.c
@@ -603,11 +603,7 @@ foundit:
php_stream_filter_append(&fp->readfilters, filter);
-#if PHP_MAJOR_VERSION >= 6
- if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, (void **) &actual_alias, entry.uncompressed_filesize, 0)) || !actual_alias) {
-#else
if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, &actual_alias, entry.uncompressed_filesize, 0)) || !actual_alias) {
-#endif
pefree(entry.filename, entry.is_persistent);
#if PHP_VERSION_ID < 50207
PHAR_ZIP_FAIL("unable to read in alias, truncated (PHP 5.2.7 and newer has a potential fix for this problem)");
@@ -628,11 +624,7 @@ foundit:
php_stream_filter_append(&fp->readfilters, filter);
-#if PHP_MAJOR_VERSION >= 6
- if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, (void **) &actual_alias, entry.uncompressed_filesize, 0)) || !actual_alias) {
-#else
if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, &actual_alias, entry.uncompressed_filesize, 0)) || !actual_alias) {
-#endif
pefree(entry.filename, entry.is_persistent);
#if PHP_VERSION_ID < 50207
PHAR_ZIP_FAIL("unable to read in alias, truncated (PHP 5.2.7 and newer has a potential fix for this problem)");
@@ -643,11 +635,7 @@ foundit:
php_stream_filter_flush(filter, 1);
php_stream_filter_remove(filter, 1 TSRMLS_CC);
} else {
-#if PHP_MAJOR_VERSION >= 6
- if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, (void **) &actual_alias, entry.uncompressed_filesize, 0)) || !actual_alias) {
-#else
if (!(entry.uncompressed_filesize = php_stream_copy_to_mem(fp, &actual_alias, entry.uncompressed_filesize, 0)) || !actual_alias) {
-#endif
pefree(entry.filename, entry.is_persistent);
PHAR_ZIP_FAIL("unable to read in alias, truncated");
}
@@ -1252,11 +1240,7 @@ int phar_zip_flush(phar_archive_data *phar, char *user_stub, long len, int defau
user_stub = 0;
-#if PHP_MAJOR_VERSION >= 6
- if (!(len = php_stream_copy_to_mem(stubfile, (void **) &user_stub, len, 0)) || !user_stub) {
-#else
if (!(len = php_stream_copy_to_mem(stubfile, &user_stub, len, 0)) || !user_stub) {
-#endif
if (error) {
spprintf(error, 0, "unable to read resource to copy stub to new zip-based phar \"%s\"", phar->fname);
}
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index e98652ba23..593a0506b0 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2379,9 +2379,7 @@ ZEND_METHOD(reflection_parameter, isDefaultValueAvailable)
{
RETURN_FALSE;
}
- if (param->offset < param->required) {
- RETURN_FALSE;
- }
+
precv = _get_recv_op((zend_op_array*)param->fptr, param->offset);
if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) {
RETURN_FALSE;
@@ -2408,10 +2406,6 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot determine default value for internal functions");
return;
}
- if (param->offset < param->required) {
- zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter is not optional");
- return;
- }
precv = _get_recv_op((zend_op_array*)param->fptr, param->offset);
if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) {
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Internal error");
diff --git a/ext/reflection/tests/bug62715.phpt b/ext/reflection/tests/bug62715.phpt
new file mode 100644
index 0000000000..feb67f614b
--- /dev/null
+++ b/ext/reflection/tests/bug62715.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong result)
+--FILE--
+<?php
+
+function test(PDO $a = null, $b = 0, array $c) {}
+$r = new ReflectionFunction('test');
+
+foreach ($r->getParameters() as $p) {
+ var_dump($p->isDefaultValueAvailable());
+}
+
+foreach ($r->getParameters() as $p) {
+ if ($p->isDefaultValueAvailable()) {
+ var_dump($p->getDefaultValue());
+ }
+}
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(false)
+NULL
+int(0)
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c
index 17af624998..c187e26818 100644
--- a/ext/session/mod_user.c
+++ b/ext/session/mod_user.c
@@ -63,7 +63,7 @@ static zval *ps_call_handler(zval *func, int argc, zval **argv TSRMLS_DC)
}
#define STDVARS1 \
- zval *retval; \
+ zval *retval = NULL; \
int ret = FAILURE
#define STDVARS \
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index a379111021..236859686f 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1387,7 +1387,11 @@ SXE_METHOD(asXML)
xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, ((xmlDocPtr) sxe->document->ptr)->encoding);
xmlOutputBufferFlush(outbuf);
+#ifdef LIBXML2_NEW_BUFFER
+ RETVAL_STRINGL((char *)xmlOutputBufferGetContent(outbuf), xmlOutputBufferGetSize(outbuf), 1);
+#else
RETVAL_STRINGL((char *)outbuf->buffer->content, outbuf->buffer->use, 1);
+#endif
xmlOutputBufferClose(outbuf);
}
} else {
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 4f8edb5211..8c1810ef71 100755
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -434,7 +434,6 @@ static spl_filesystem_object * spl_filesystem_object_create_info(spl_filesystem_
if (file_path && !use_copy) {
efree(file_path);
}
- use_copy = 1;
file_path_len = 1;
file_path = "/";
#endif
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index ee8f51eb33..0aac6d3f30 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -223,10 +223,14 @@ static zend_object_value spl_fixedarray_object_new_ex(zend_class_entry *class_ty
if (orig && clone_orig) {
spl_fixedarray_object *other = (spl_fixedarray_object*)zend_object_store_get_object(orig TSRMLS_CC);
intern->ce_get_iterator = other->ce_get_iterator;
-
- intern->array = emalloc(sizeof(spl_fixedarray));
- spl_fixedarray_init(intern->array, other->array->size TSRMLS_CC);
- spl_fixedarray_copy(intern->array, other->array TSRMLS_CC);
+ if (!other->array) {
+ /* leave a empty object, will be dtor later by CLONE handler */
+ zend_throw_exception(spl_ce_RuntimeException, "The instance wasn't initialized properly", 0 TSRMLS_CC);
+ } else {
+ intern->array = emalloc(sizeof(spl_fixedarray));
+ spl_fixedarray_init(intern->array, other->array->size TSRMLS_CC);
+ spl_fixedarray_copy(intern->array, other->array TSRMLS_CC);
+ }
}
while (parent) {
diff --git a/ext/spl/tests/bug62904.phpt b/ext/spl/tests/bug62904.phpt
new file mode 100644
index 0000000000..7e392da9ab
--- /dev/null
+++ b/ext/spl/tests/bug62904.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #62904 (Crash when cloning an object which inherits SplFixedArray)
+--FILE--
+<?php
+
+class foo extends SplFixedArray {
+ public function __construct($size) {
+ }
+}
+
+$x = new foo(2);
+
+try {
+ $z = clone $x;
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+--EXPECTF--
+string(40) "The instance wasn't initialized properly"
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 99831a1f42..4858b6e375 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -5108,8 +5108,11 @@ void php_free_shutdown_functions(TSRMLS_D) /* {{{ */
zend_hash_destroy(BG(user_shutdown_function_names));
FREE_HASHTABLE(BG(user_shutdown_function_names));
BG(user_shutdown_function_names) = NULL;
- }
- zend_end_try();
+ } zend_catch {
+ /* maybe shutdown method call exit, we just ignore it */
+ FREE_HASHTABLE(BG(user_shutdown_function_names));
+ BG(user_shutdown_function_names) = NULL;
+ } zend_end_try();
}
/* }}} */
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 44d3a4e6a9..7147e98258 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -162,6 +162,7 @@ static void file_globals_ctor(php_file_globals *file_globals_p TSRMLS_DC)
FG(pclose_ret) = 0;
FG(user_stream_current_filename) = NULL;
FG(def_chunk_size) = PHP_SOCK_CHUNK_SIZE;
+ FG(wrapper_errors) = NULL;
}
static void file_globals_dtor(php_file_globals *file_globals_p TSRMLS_DC)
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 1a7bd1e0b4..68bf3fecfc 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -3902,7 +3902,6 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines)
new_char_count--;
}
if (new_char_count > 0) {
- char_count=new_char_count;
begin=new_begin;
}
}
diff --git a/ext/standard/tests/file/realpath_cache.phpt b/ext/standard/tests/file/realpath_cache.phpt
index 92d6fc5b2a..0eb9dc519a 100644
--- a/ext/standard/tests/file/realpath_cache.phpt
+++ b/ext/standard/tests/file/realpath_cache.phpt
@@ -19,7 +19,7 @@ echo "Done\n";
int(%d)
array(4) {
["key"]=>
- %s(%d)
+ %s(%f)
["is_dir"]=>
bool(true)
["realpath"]=>
diff --git a/ext/standard/tests/streams/bug61115-1.phpt b/ext/standard/tests/streams/bug61115-1.phpt
index 89374e7353..99e2f7929c 100644
--- a/ext/standard/tests/streams/bug61115-1.phpt
+++ b/ext/standard/tests/streams/bug61115-1.phpt
@@ -1,5 +1,11 @@
--TEST--
Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link - variation 1
+--SKIPIF--
+<?php
+if (getenv("USE_ZEND_ALLOC") === "0") {
+ die("skip Zend MM disabled");
+}
+?>
--FILE--
<?php
diff --git a/ext/standard/tests/strings/str_pad_variation5.phpt b/ext/standard/tests/strings/str_pad_variation5.phpt
index 4b300c4717..cd979a1c8b 100644
--- a/ext/standard/tests/strings/str_pad_variation5.phpt
+++ b/ext/standard/tests/strings/str_pad_variation5.phpt
@@ -5,6 +5,9 @@ memory_limit=128M
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+if (getenv("USE_ZEND_ALLOC") === "0") {
+ die("skip Zend MM disabled");
+}
?>
--FILE--
<?php
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 18c300c51c..2525afb905 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -220,14 +220,14 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
if (query && fragment) {
if (query > fragment) {
- p = e = fragment;
+ e = fragment;
} else {
- p = e = query;
+ e = query;
}
} else if (query) {
- p = e = query;
+ e = query;
} else if (fragment) {
- p = e = fragment;
+ e = fragment;
}
} else {
e = p;
diff --git a/ext/xmlrpc/tests/bug61264.phpt b/ext/xmlrpc/tests/bug61264.phpt
index b1da27f252..24e4b2749c 100644
--- a/ext/xmlrpc/tests/bug61264.phpt
+++ b/ext/xmlrpc/tests/bug61264.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #61264: xmlrpc_parse_method_descriptions leaks temporary variable
+--SKIPIF--
+<?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
--FILE--
<?php
$xml = <<<XML
diff --git a/ext/zip/tests/bug51353.phpt b/ext/zip/tests/bug51353.phpt
new file mode 100644
index 0000000000..560945f9dd
--- /dev/null
+++ b/ext/zip/tests/bug51353.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Bug #51353 ZIP64 problem, archive with 100000 items
+--SKIPIF--
+<?php
+if(!extension_loaded('zip')) die('skip');
+die('skip the test might get very long, activate it manually');
+--FILE--
+<?php
+/* This test might get very long depending on the mashine it's running on. Therefore
+adding an explicit skip, remove it to run this test. */
+set_time_limit(0);
+
+$base_path = dirname(__FILE__);
+
+/* Either we ship a file with 100000 entries which would be >12M big,
+ or create it dynamically. */
+$zip = new ZipArchive;
+$r = $zip->open("$base_path/51353.zip", ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE);
+if ($r) {
+ for ($i = 0; $i < 100000; $i++) {
+ $zip->addFromString("$i.txt", '1');
+ }
+ $zip->close();
+} else {
+ die("failed");
+}
+
+$zip = new ZipArchive;
+$r = $zip->open("$base_path/51353.zip");
+if ($r) {
+ $zip->extractTo("$base_path/51353_unpack");
+ $zip->close();
+
+ $a = glob("$base_path/51353_unpack/*.txt");
+ echo count($a) . "\n";
+} else {
+ die("failed");
+}
+
+echo "OK";
+--CLEAN--
+<?php
+$base_path = dirname(__FILE__);
+
+unlink("$base_path/51353.zip");
+
+$a = glob("$base_path/51353_unpack/*.txt");
+foreach($a as $f) {
+ unlink($f);
+}
+rmdir("$base_path/51353_unpack");
+--EXPECT--
+100000
+OK
diff --git a/tests/lang/bug45392.phpt b/tests/lang/bug45392.phpt
index ae84cd9d1d..78876c7c80 100644
--- a/tests/lang/bug45392.phpt
+++ b/tests/lang/bug45392.phpt
@@ -2,6 +2,11 @@
Bug #45392 (ob_start()/ob_end_clean() and memory_limit)
--INI--
display_errors=stderr
+--SKIPIF--
+<?php
+if (getenv("USE_ZEND_ALLOC") === "0") {
+ die("skip Zend MM disabled");
+}
--FILE--
<?php
echo __LINE__ . "\n";