Skip to content

Commit 70150c1

Browse files
committed
Adjusted error names for prefix or name
1 parent d601bd6 commit 70150c1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ext/session/session.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ PHPAPI zend_result php_session_valid_key(const char *key) /* {{{ */
368368
|| (c >= '0' && c <= '9')
369369
|| c == ','
370370
|| c == '-')) {
371-
php_error_docref(NULL, E_WARNING, "Prefix cannot contain special characters. Only the A-Z, a-z, 0-9, \"-\", and \",\" characters are allowed");
371+
php_error_docref(NULL, E_WARNING, "Prefix or name cannot contain special characters. Only the A-Z, a-z, 0-9, \"-\", and \",\" characters are allowed");
372372
return FAILURE;
373373
}
374374
}
@@ -378,7 +378,7 @@ PHPAPI zend_result php_session_valid_key(const char *key) /* {{{ */
378378
/* Somewhat arbitrary length limit here, but should be way more than
379379
anyone needs and avoids file-level warnings later on if we exceed MAX_PATH */
380380
if (len == 0 || len > PS_MAX_SID_LENGTH) {
381-
php_error_docref(NULL, E_WARNING, "Prefix cannot be larger than 256 characters");
381+
php_error_docref(NULL, E_WARNING, "Prefix or name cannot be larger than 256 characters");
382382
return FAILURE;
383383
}
384384

ext/session/tests/rfc1867_sid_invalid.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ session_destroy();
5252
@unlink(__DIR__ . DIRECTORY_SEPARATOR . "rfc1867_sid_invalid.post.txt");
5353
?>
5454
--EXPECTF--
55-
Warning: PHP Request Startup: Prefix cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0
55+
Warning: PHP Request Startup: Prefix or name cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0
5656

5757
Warning: PHP Request Startup: Failed to read session data: files (path: ) in Unknown on line 0
5858

5959
Warning: PHP Request Startup: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
6060

61-
Warning: PHP Request Startup: Prefix cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0
61+
Warning: PHP Request Startup: Prefix or name cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in Unknown on line 0
6262

6363
Warning: PHP Request Startup: Failed to read session data: files (path: ) in Unknown on line 0
6464

ext/session/tests/session_create_id_invalid_prefix.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ try {
2222
?>
2323
Done
2424
--EXPECTF--
25-
Warning: session_create_id(): Prefix cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in %s on line %d
25+
Warning: session_create_id(): Prefix or name cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in %s on line %d
2626
bool(false)
2727

28-
Warning: session_create_id(): Prefix cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in %s on line %d
28+
Warning: session_create_id(): Prefix or name cannot contain special characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed in %s on line %d
2929
bool(false)
3030

31-
Warning: session_create_id(): Prefix cannot be larger than 256 characters in %s on line %d
31+
Warning: session_create_id(): Prefix or name cannot be larger than 256 characters in %s on line %d
3232
bool(false)
3333
session_create_id(): Argument #1 ($prefix) must not contain any null bytes
3434
Done

0 commit comments

Comments
 (0)