php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #70546
Patch php-sysvshm-shm_remove-twice revision 2015-09-21 14:42 UTC by rainer dot jung at kippdata dot de

Patch php-sysvshm-shm_remove-twice for Unknown/Other Function Bug #70546

Patch version 2015-09-21 14:42 UTC

Return to Bug #70546 | Download this patch
Patch Revisions:

Developer: rainer.jung@kippdata.de

diff --git a/ext/sysvshm/tests/002.phpt b/ext/sysvshm/tests/002.phpt
index 4ae7a86..cf83b82 100644
--- a/ext/sysvshm/tests/002.phpt
+++ b/ext/sysvshm/tests/002.phpt
@@ -25,7 +25,7 @@ var_dump($s = shm_attach($key, 1024));
 shm_remove($key);
 var_dump($s = shm_attach($key, 1024));
 shm_remove($s);
-var_dump(shm_attach($key, 1024, 0666));
+var_dump($s = shm_attach($key, 1024, 0666));
 shm_remove($s);

 var_dump($s = shm_attach($key, 1024));
diff --git a/ext/sysvshm/tests/007.phpt b/ext/sysvshm/tests/007.phpt
index d68fcea..584f13a 100644
--- a/ext/sysvshm/tests/007.phpt
+++ b/ext/sysvshm/tests/007.phpt
@@ -17,7 +17,6 @@ var_dump(shm_remove(0));
 var_dump(shm_remove(""));

 var_dump(shm_remove($s));
-var_dump(shm_remove($s));

 shm_detach($s);
 var_dump(shm_remove($s));
@@ -38,7 +37,6 @@ NULL
 Warning: shm_remove() expects parameter 1 to be resource, string given in %s007.php on line %d
 NULL
 bool(true)
-bool(true)

 Warning: shm_remove(): supplied resource is not a valid sysvshm resource in %s007.php on line %d
 bool(false)
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Nov 30 14:05:55 2022 UTC