Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Zend/tests/display_error_function_args.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ Warning: unlink('/'): %s in %s on line %d

Warning: password_hash(Object(SensitiveParameterValue), '2y', Array): The "salt" option has been ignored, since providing a custom salt is no longer supported in %s on line %d

Warning: unlink(/): %s in %s on line %d
Warning: unlink(): %s in %s on line %d

Warning: password_hash(): The "salt" option has been ignored, since providing a custom salt is no longer supported in %s on line %d
19 changes: 19 additions & 0 deletions Zend/tests/partial_application/closure_rt_cache_lifetime.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
Partial application over a Closure::fromCallable() must not double-free the run_time_cache
--FILE--
<?php
class C {
public function m($x, $y) { return $x + $y; }
}

$cl = Closure::fromCallable([new C, 'm']);
$partial = $cl(10, ?);
var_dump($partial(5));
unset($partial);
unset($cl);
gc_collect_cycles();
echo "OK\n";
?>
--EXPECT--
int(15)
OK
14 changes: 10 additions & 4 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,11 @@ PHP_MSHUTDOWN_FUNCTION(curl)
/* {{{ curl_write */
static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
{
ZEND_ASSERT(size == 1);

php_curl *ch = (php_curl *) ctx;
php_curl_write *write_handler = ch->handlers.write;
size_t length = size * nmemb;
size_t length = nmemb;

#if PHP_CURL_DEBUG
fprintf(stderr, "curl_write() called\n");
Expand Down Expand Up @@ -786,6 +788,8 @@ static int curl_ssh_hostkeyfunction(void *clientp, int keytype, const char *key,
/* {{{ curl_read */
static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
{
ZEND_ASSERT(size == 1);

php_curl *ch = (php_curl *)ctx;
php_curl_read *read_handler = ch->handlers.read;
size_t length = 0;
Expand All @@ -808,15 +812,15 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
} else {
ZVAL_NULL(&argv[1]);
}
ZVAL_LONG(&argv[2], (int)size * nmemb);
ZVAL_LONG(&argv[2], (zend_long) nmemb);

ch->in_callback = true;
zend_call_known_fcc(&read_handler->fcc, &retval, /* param_count */ 3, argv, /* named_params */ NULL);
ch->in_callback = false;
if (!Z_ISUNDEF(retval)) {
_php_curl_verify_handlers(ch, /* reporterror */ true);
if (Z_TYPE(retval) == IS_STRING) {
length = MIN(size * nmemb, Z_STRLEN(retval));
length = MIN(nmemb, Z_STRLEN(retval));
memcpy(data, Z_STRVAL(retval), length);
} else if (Z_TYPE(retval) == IS_LONG) {
length = Z_LVAL_P(&retval);
Expand Down Expand Up @@ -884,9 +888,11 @@ static int curl_seek(void *clientp, curl_off_t offset, int origin)
/* {{{ curl_write_header */
static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx)
{
ZEND_ASSERT(size == 1);

php_curl *ch = (php_curl *) ctx;
php_curl_write *write_handler = ch->handlers.write_header;
size_t length = size * nmemb;
size_t length = nmemb;

switch (write_handler->method) {
case PHP_CURL_STDOUT:
Expand Down
3 changes: 1 addition & 2 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -2146,8 +2146,7 @@ zend_op_array *zend_accel_compile_pfa(zend_ast *ast,
* See comment in zend_accel_pfa_key(). */
zend_op_array *copy = zend_arena_alloc(&CG(arena), sizeof(*copy));
memcpy(copy, called_function, sizeof(*copy));
zend_string_addref(copy->function_name);
(*copy->refcount)++;
function_add_ref((zend_function *) copy);
/* Reference the copy in op_array->dynamic_func_defs so that it's
* destroyed when op_array is destroyed. */
ZEND_ASSERT(!op_array->dynamic_func_defs && !op_array->num_dynamic_func_defs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ array(3) {
}
Destroy [%s,%s]

Warning: unlink(%s): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
Close [%s,PHPSESSID]
bool(true)
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ GC [0]
bool(true)
Destroy [%s,PHPT-%d]

Warning: unlink(%s): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
Close [%s,PHPSESSID]
bool(true)
8 changes: 4 additions & 4 deletions ext/standard/tests/file/copy_variation4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Destination file name => %s/
Size of source file => int(1500)
Size of destination file => int(%d)

Warning: unlink(%s): %s
Warning: unlink(): %s

-- Iteration 2 --
Existence of destination file before copy => bool(true)
Expand All @@ -103,7 +103,7 @@ Destination file name => %s/
Size of source file => int(1500)
Size of destination file => int(%d)

Warning: unlink(%s): %s
Warning: unlink(): %s

-- Iteration 3 --
Existence of destination file before copy => bool(true)
Expand All @@ -115,7 +115,7 @@ Destination file name => %s/
Size of source file => int(1500)
Size of destination file => int(%d)

Warning: unlink(%s): %s
Warning: unlink(): %s

-- Iteration 4 --
Existence of destination file before copy => bool(true)
Expand All @@ -127,7 +127,7 @@ Destination file name => %s/
Size of source file => int(1500)
Size of destination file => int(%d)

Warning: unlink(%s): %s
Warning: unlink(): %s

-- Iteration 5 --
Existence of destination file before copy => bool(false)
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/tests/file/copy_variation5-win32.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Destination file name => %s/CopY5.TMP
Size of source file => int(1500)
Size of destination file => int(1500)

Warning: unlink(%s/COPY5.TMP): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d

Warning: unlink(%s/CopY5.TMP): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
*** Done ***
2 changes: 1 addition & 1 deletion ext/standard/tests/file/mkdir_rmdir_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ echo "Done\n";
--EXPECTF--
*** Testing rmdir() on non-existent directory ***

Warning: rmdir(temp): No such file or directory in %s on line %d
Warning: rmdir(): No such file or directory in %s on line %d
bool(false)
Done
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ bool(true)
*** Testing rmdir() on a non-empty directory ***
bool(true)

Warning: rmdir(%s/mkdir私はガラスを食べられます/): Directory not empty in %s on line %d
Warning: rmdir(): Directory not empty in %s on line %d
bool(false)

*** Testing mkdir() and rmdir() for binary safe functionality ***
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ bool(true)
*** Testing rmdir() on a non-empty directory ***
bool(true)

Warning: rmdir(%s/mkdir/): Directory not empty in %s on line %d
Warning: rmdir(): Directory not empty in %s on line %d
bool(false)

*** Testing mkdir() and rmdir() for binary safe functionality ***
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/mkdir_rmdir_variation2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bool(true)
*** Testing rmdir() on a non-empty directory ***
bool(true)

Warning: rmdir(%s/mkdir_variation2/): %s on line %d
Warning: rmdir(): %s on line %d
bool(false)

*** Testing mkdir() and rmdir() for binary safe functionality ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Warning: readlink(): readlink failed to read the symbolic link (%s), error %d in
bool(false)
bool(false)

Warning: unlink(%s/./readlink_realpath_variation2/home/../home//tests//..//..//..//home//readlink_realpath_variation2_link.tmp/): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d

-- Testing readlink() and realpath() with hardlink, linkname stored inside an array --
bool(true)
Expand All @@ -94,5 +94,5 @@ Warning: readlink(): readlink failed to read the symbolic link (%s), error %d in
bool(false)
bool(false)

Warning: unlink(%s/./readlink_realpath_variation2/home/../home//tests//..//..//..//home//readlink_realpath_variation2_link.tmp/): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
Done
4 changes: 2 additions & 2 deletions ext/standard/tests/file/readlink_realpath_variation2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Warning: readlink(): No such file or directory in %s on line %d
bool(false)
bool(false)

Warning: unlink(%s/./readlink_realpath_variation2/home/../home//tests//..//..//..//home//readlink_realpath_variation2_link.tmp/): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d

-- Testing readlink() and realpath() with hardlink, linkname stored inside an array --
bool(true)
Expand All @@ -93,5 +93,5 @@ Warning: readlink(): No such file or directory in %s on line %d
bool(false)
bool(false)

Warning: unlink(%s/./readlink_realpath_variation2/home/../home//tests//..//..//..//home//readlink_realpath_variation2_link.tmp/): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
Done
2 changes: 1 addition & 1 deletion ext/standard/tests/file/rename_variation-win32.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ bool(false)
bool(false)
bool(false)

Warning: unlink(%s/rename_variation2.tmp): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
-- Iteration 3 --
bool(true)
bool(false)
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/rename_variation.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool(false)
bool(false)
bool(false)

Warning: unlink(%s): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
-- Iteration 3 --
bool(true)
bool(false)
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/tests/file/rmdir_variation3-win32.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ Directory removed
Directory removed
-- removing rmdirVar3.tmp\..\BADDIR\aSubDir --

Warning: rmdir(rmdirVar3.tmp\..\BADDIR\aSubDir): No such file or directory in %s on line %d
Warning: rmdir(): No such file or directory in %s on line %d
-- removing BADDIR\aSubDir --

Warning: rmdir(BADDIR\aSubDir): No such file or directory in %s on line %d
Warning: rmdir(): No such file or directory in %s on line %d
-- removing %s\rmdirVar3.tmp\aSubDir --
Directory removed
-- removing %s\.\rmdirVar3.tmp\aSubDir --
Expand All @@ -87,7 +87,7 @@ Directory removed
Directory removed
-- removing %s\BADDIR\aSubDir --

Warning: rmdir(%s\BADDIR\aSubDir): No such file or directory in %s on line %d
Warning: rmdir(): No such file or directory in %s on line %d
-- removing rmdirVar3.tmp\aSubDir\ --
Directory removed
-- removing %s\rmdirVar3.tmp\aSubDir\ --
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/tests/file/rmdir_variation3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ Directory removed
Directory removed
-- removing rmdirVar3.tmp/../BADDIR/aSubDir --

Warning: rmdir(rmdirVar3.tmp/../BADDIR/aSubDir): No such file or directory in %s on line %d
Warning: rmdir(): No such file or directory in %s on line %d
-- removing BADDIR/aSubDir --

Warning: rmdir(BADDIR/aSubDir): No such file or directory in %s on line %d
Warning: rmdir(): No such file or directory in %s on line %d
-- removing %s/rmdirVar3.tmp/aSubDir --
Directory removed
-- removing %s/./rmdirVar3.tmp/aSubDir --
Expand All @@ -77,7 +77,7 @@ Directory removed
Directory removed
-- removing %s/BADDIR/aSubDir --

Warning: rmdir(%s/BADDIR/aSubDir): No such file or directory in %s on line %d
Warning: rmdir(): No such file or directory in %s on line %d
-- removing rmdirVar3.tmp/aSubDir/ --
Directory removed
-- removing %s/rmdirVar3.tmp/aSubDir/ --
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/tests/file/unlink_error-win32-mb.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ bool(false)

-- Testing unlink() on non-existent file --

Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
bool(false)

-- Testing unlink() on directory --

Warning: unlink(%s/unlink_error): Is a directory in %s on line %d
Warning: unlink(): Is a directory in %s on line %d
bool(false)
Done
4 changes: 2 additions & 2 deletions ext/standard/tests/file/unlink_error-win32.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ bool(false)

-- Testing unlink() on non-existent file --

Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
bool(false)

-- Testing unlink() on directory --

Warning: unlink(%s/unlink_error): Is a directory in %s on line %d
Warning: unlink(): Is a directory in %s on line %d
bool(false)
Done
4 changes: 2 additions & 2 deletions ext/standard/tests/file/unlink_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ bool(false)

-- Testing unlink() on non-existent file --

Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
bool(false)

-- Testing unlink() on directory --

Warning: unlink(%s/unlink_error): %s in %s on line %d
Warning: unlink(): %s in %s on line %d
bool(false)
Done
2 changes: 1 addition & 1 deletion ext/standard/tests/file/unlink_variation1-win32-mb.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool(true)
-- Unlinking file without write permission, its dir having default permission --
bool(true)

Warning: unlink(%s/unlink_variation1/unlink_variation1-win32.tmp): Permission denied in %s on line %d
Warning: unlink(): Permission denied in %s on line %d
bool(false)
bool(true)
bool(false)
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/unlink_variation1-win32.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bool(true)
-- Unlinking file without write permission, its dir having default permission --
bool(true)

Warning: unlink(%s/unlink_variation1/unlink_variation1-win32.tmp): Permission denied in %s on line %d
Warning: unlink(): Permission denied in %s on line %d
bool(false)
bool(true)
bool(false)
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/unlink_variation1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ echo "Done\n";
-- Unlink file having default permission and its dir having read only permission --
bool(true)

Warning: unlink(%s): %s in %s on line %d
Warning: unlink(): %s in %s on line %d
bool(false)
bool(false)
bool(true)
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/unlink_variation10.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ directory unlinked

--- try to unlink a directory ---

Warning: unlink(unlinkVar10.tmp/linkme.tmp): %s in %s on line %d
Warning: unlink(): %s in %s on line %d
2 changes: 1 addition & 1 deletion ext/standard/tests/file/unlink_variation4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ echo "Done\n";
bool(true)
bool(false)

Warning: unlink(%s/unlink_variation4.tmp): %s in %s on line %d
Warning: unlink(): %s in %s on line %d
bool(false)
Done
10 changes: 5 additions & 5 deletions ext/standard/tests/file/unlink_variation8-win32.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ file removed
file removed
-- removing unlinkVar8.tmp/../BADDIR/file.tmp --

Warning: unlink(unlinkVar8.tmp/../BADDIR/file.tmp): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
-- removing BADDIR/file.tmp --

Warning: unlink(BADDIR/file.tmp): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
-- removing %s/unlinkVar8.tmp/file.tmp --
file removed
-- removing %s/./unlinkVar8.tmp/file.tmp --
Expand All @@ -92,13 +92,13 @@ file removed
file removed
-- removing %s/BADDIR/file.tmp --

Warning: unlink(%s/BADDIR/file.tmp): No such file or directory in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
-- removing unlinkVar8.tmp/file.tmp/ --

Warning: unlink(unlinkVar8.tmp/file.tmp/): %rNo such file or directory|Not a directory%r in %s on line %d
Warning: unlink(): %rNo such file or directory|Not a directory%r in %s on line %d
-- removing %s/unlinkVar8.tmp/file.tmp/ --

Warning: unlink(%s/unlinkVar8.tmp/file.tmp/): %rNo such file or directory|Not a directory%r in %s on line %d
Warning: unlink(): %rNo such file or directory|Not a directory%r in %s on line %d
-- removing unlinkVar8.tmp//file.tmp --
file removed
-- removing %s//unlinkVar8.tmp//file.tmp --
Expand Down
Loading
Loading