Skip to content
18 changes: 9 additions & 9 deletions Zend/tests/zend_ini/gh16886.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@ echo ini_parse_quantity('0o+0'), "\n";
echo ini_parse_quantity('0o-0'), "\n";
?>
--EXPECTF--
Warning: Invalid quantity "0x 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
Warning: ini_parse_quantity(): Invalid quantity "0x 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0x+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
Warning: ini_parse_quantity(): Invalid quantity "0x+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0x-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
Warning: ini_parse_quantity(): Invalid quantity "0x-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0b 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
Warning: ini_parse_quantity(): Invalid quantity "0b 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0b+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
Warning: ini_parse_quantity(): Invalid quantity "0b+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0b-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
Warning: ini_parse_quantity(): Invalid quantity "0b-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0o 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
Warning: ini_parse_quantity(): Invalid quantity "0o 0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0o+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
Warning: ini_parse_quantity(): Invalid quantity "0o+0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0

Warning: Invalid quantity "0o-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
Warning: ini_parse_quantity(): Invalid quantity "0o-0": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
0
2 changes: 1 addition & 1 deletion ext/exif/exif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ static HashTable *exif_make_tag_ht(tag_info_type *tag_table)
zend_hash_init(ht, 0, NULL, NULL, 1);
while (tag_table->Tag != TAG_END_OF_LIST) {
if (!zend_hash_index_add_ptr(ht, tag_table->Tag, tag_table->Desc)) {
zend_error(E_CORE_ERROR, "Duplicate tag %x", tag_table->Tag);
php_error_docref(NULL, E_CORE_ERROR, "Duplicate tag %x", tag_table->Tag);
}
tag_table++;
}
Expand Down
2 changes: 1 addition & 1 deletion ext/pdo/pdo_dbh.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ PDO_API void php_pdo_internal_construct_driver(INTERNAL_FUNCTION_PARAMETERS, zen
}

if (!strncmp(data_source, "uri:", sizeof("uri:")-1)) {
zend_error(E_DEPRECATED, "Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs");
php_error_docref(NULL, E_DEPRECATED, "Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs");
if (EG(exception)) {
RETURN_THROWS();
}
Expand Down
4 changes: 2 additions & 2 deletions ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ MySQLPDOTest::skip();
print "done!";
?>
--EXPECTF--
Deprecated: Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs in %s on line %d
Deprecated: PDO::__construct(): Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs in %s on line %d

Deprecated: Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs in %s on line %d
Deprecated: PDO::__construct(): Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs in %s on line %d
done!
2 changes: 1 addition & 1 deletion ext/pdo_sqlite/pdo_sqlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ PHP_METHOD(Pdo_Sqlite, openBlob)
sqlite_flags = (flags & SQLITE_OPEN_READWRITE) ? 1 : 0;

if (sqlite3_blob_open(sqlite_handle, dbname, table, column, rowid, sqlite_flags, &blob) != SQLITE_OK) {
zend_error(E_WARNING, "Unable to open blob: %s", sqlite3_errmsg(sqlite_handle));
php_error_docref(NULL, E_WARNING, "Unable to open blob: %s", sqlite3_errmsg(sqlite_handle));
RETURN_FALSE;
}

Expand Down
4 changes: 2 additions & 2 deletions ext/pdo_sqlite/tests/pdo_sqlite___construct_uri.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ var_dump(file_exists($dbFile));
--EXPECTF--
bool(false)

Deprecated: Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs in %s on line %d
Deprecated: PDO::__construct(): Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs in %s on line %d
bool(true)
bool(false)
ErrorException: Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs
ErrorException: PDO::__construct(): Looking up the DSN from a URI is deprecated due to possible security concerns with DSNs coming from remote URIs
bool(false)
14 changes: 7 additions & 7 deletions ext/sodium/libsodium.c
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ PHP_FUNCTION(sodium_crypto_pwhash)
RETURN_THROWS();
}
if (passwd_len <= 0) {
zend_error(E_WARNING, "empty password");
php_error_docref(NULL, E_WARNING, "empty password");
}
if (salt_len != crypto_pwhash_SALTBYTES) {
zend_argument_value_error(3, "must be SODIUM_CRYPTO_PWHASH_SALTBYTES bytes long");
Expand Down Expand Up @@ -1536,7 +1536,7 @@ PHP_FUNCTION(sodium_crypto_pwhash_str)
RETURN_THROWS();
}
if (passwd_len <= 0) {
zend_error(E_WARNING, "empty password");
php_error_docref(NULL, E_WARNING, "empty password");
}
if (opslimit < crypto_pwhash_OPSLIMIT_MIN) {
zend_argument_value_error(2, "must be greater than or equal to %d", crypto_pwhash_OPSLIMIT_MIN);
Expand Down Expand Up @@ -1601,7 +1601,7 @@ PHP_FUNCTION(sodium_crypto_pwhash_str_verify)
RETURN_THROWS();
}
if (passwd_len <= 0) {
zend_error(E_WARNING, "empty password");
php_error_docref(NULL, E_WARNING, "empty password");
}
if (crypto_pwhash_str_verify
(hash_str, passwd, (unsigned long long) passwd_len) == 0) {
Expand Down Expand Up @@ -1647,7 +1647,7 @@ PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256)
RETURN_THROWS();
}
if (passwd_len <= 0) {
zend_error(E_WARNING, "empty password");
php_error_docref(NULL, E_WARNING, "empty password");
}
if (salt_len != crypto_pwhash_scryptsalsa208sha256_SALTBYTES) {
zend_argument_value_error(3, "must be SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES bytes long");
Expand Down Expand Up @@ -1703,7 +1703,7 @@ PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str)
RETURN_THROWS();
}
if (passwd_len <= 0) {
zend_error(E_WARNING, "empty password");
php_error_docref(NULL, E_WARNING, "empty password");
}
if (opslimit < crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE) {
zend_argument_value_error(2, "must be greater than or equal to %d", crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE);
Expand Down Expand Up @@ -1743,10 +1743,10 @@ PHP_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify)
RETURN_THROWS();
}
if (passwd_len <= 0) {
zend_error(E_WARNING, "empty password");
php_error_docref(NULL, E_WARNING, "empty password");
}
if (hash_str_len != crypto_pwhash_scryptsalsa208sha256_STRBYTES - 1) {
zend_error(E_WARNING, "wrong size for the hashed password");
php_error_docref(NULL, E_WARNING, "wrong size for the hashed password");
RETURN_FALSE;
}
if (crypto_pwhash_scryptsalsa208sha256_str_verify
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/basic_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@ PHP_FUNCTION(ini_parse_quantity)
RETVAL_LONG(zend_ini_parse_quantity(shorthand, &errstr));

if (errstr) {
zend_error(E_WARNING, "%s", ZSTR_VAL(errstr));
php_error_docref(NULL, E_WARNING, "%s", ZSTR_VAL(errstr));
zend_string_release(errstr);
}
}
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/browscap.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ static void php_browscap_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callb
if (ctx->current_section_name != NULL &&
zend_string_equals_ci(ctx->current_section_name, Z_STR_P(arg2))
) {
zend_error(E_CORE_ERROR, "Invalid browscap ini file: "
php_error_docref("misc.configuration.php#ini.browscap", E_CORE_ERROR, "Invalid browscap ini file: "
"'Parent' value cannot be same as the section name: %s "
"(in file %s)", ZSTR_VAL(ctx->current_section_name), zend_ini_string_literal("browscap"));
return;
Expand Down Expand Up @@ -409,7 +409,7 @@ static zend_result browscap_read_file(const char *filename, browser_data *browda

fp = VCWD_FOPEN(filename, "r");
if (!fp) {
zend_error(E_CORE_WARNING, "Cannot open \"%s\" for reading", filename);
php_error_docref(NULL, E_CORE_WARNING, "Cannot open \"%s\" for reading", filename);
return FAILURE;
}
zend_stream_init_fp(&fh, fp, filename);
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static void file_globals_dtor(php_file_globals *file_globals_p)
static PHP_INI_MH(OnUpdateAutoDetectLineEndings)
{
if (zend_ini_parse_bool(new_value)) {
zend_error(E_DEPRECATED, "auto_detect_line_endings is deprecated");
php_error_docref(NULL, E_DEPRECATED, "auto_detect_line_endings is deprecated");
}
return OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage);
}
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/math.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ PHPAPI void _php_math_basetozval(zend_string *str, int base, zval *ret)
}

if (invalidchars > 0) {
zend_error(E_DEPRECATED, "Invalid characters passed for attempted conversion, these have been ignored");
php_error_docref(NULL, E_DEPRECATED, "Invalid characters passed for attempted conversion, these have been ignored");
}

if (mode == 1) {
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ PHP_FUNCTION(net_get_interfaces) {
}

if (pAddresses == NULL) {
zend_error(E_WARNING, "Memory allocation failed for IP_ADAPTER_ADDRESSES struct");
php_error_docref(NULL, E_WARNING, "Memory allocation failed for IP_ADAPTER_ADDRESSES struct");
RETURN_FALSE;
}

dwRetVal = GetAdaptersAddresses(family, flags, NULL, pAddresses, &outBufLen);

if (NO_ERROR != dwRetVal) {
char *buf = php_win32_error_to_msg(GetLastError());
zend_error(E_WARNING, "GetAdaptersAddresses failed: %s", buf);
php_error_docref(NULL, E_WARNING, "GetAdaptersAddresses failed: %s", buf);
php_win32_error_msg_free(buf);
FREE(pAddresses);
RETURN_FALSE;
Expand Down Expand Up @@ -265,7 +265,7 @@ PHP_FUNCTION(net_get_interfaces) {
ZEND_PARSE_PARAMETERS_NONE();

if (getifaddrs(&addrs)) {
php_error(E_WARNING, "getifaddrs() failed %d: %s", errno, strerror(errno));
php_error_docref(NULL, E_WARNING, "getifaddrs() failed %d: %s", errno, strerror(errno));
RETURN_FALSE;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/auto_detect_line_endings_1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var_dump(fgets(STDIN));
echo "Done\n";
?>
--EXPECT--
Deprecated: auto_detect_line_endings is deprecated in Unknown on line 0
Deprecated: PHP Startup: auto_detect_line_endings is deprecated in Unknown on line 0
string(1) "1"
string(8) "fooBar1"
string(8) "fooBar2"
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/auto_detect_line_endings_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var_dump(fgets($stdin));
echo "Done\n";
?>
--EXPECTF--
Deprecated: auto_detect_line_endings is deprecated in %s on line %d
Deprecated: ini_set(): auto_detect_line_endings is deprecated in %s on line %d
string(2) "on"
string(8) "fooBar1"
string(8) "fooBar2"
Expand Down
Loading
Loading