diff --git a/NEWS b/NEWS index e6688bb6791..dae787ab53f 100644 --- a/NEWS +++ b/NEWS @@ -80,8 +80,6 @@ PHP NEWS - Posix: . Added validity check to the flags argument for posix_access(). (arshidkv12) - . Added validity check to the permissions argument for posix_mkfifo(). - (arshidkv12) - Reflection: . Fixed bug GH-20217 (ReflectionClass::isIterable() incorrectly returns true diff --git a/ext/posix/posix.c b/ext/posix/posix.c index a81372349fd..76e14f6ecb0 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -621,11 +621,6 @@ PHP_FUNCTION(posix_mkfifo) RETURN_FALSE; } - if (mode < 0 || (mode & ~07777)) { - zend_argument_value_error(2, "must be between 0 and 0o7777"); - RETURN_THROWS(); - } - result = mkfifo(ZSTR_VAL(path), mode); if (result < 0) { POSIX_G(last_error) = errno; diff --git a/ext/posix/tests/posix_mkfifo_invalid_mode.phpt b/ext/posix/tests/posix_mkfifo_invalid_mode.phpt deleted file mode 100644 index 5c9f251adfc..00000000000 --- a/ext/posix/tests/posix_mkfifo_invalid_mode.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -posix_mkfifo(): invalid mode argument ---SKIPIF-- - ---FILE-- -getMessage(), "\n"; -} - -// Too large mode -try { - posix_mkfifo(__DIR__ . "/testfifo2", 010000); // > 07777 -} catch (ValueError $e) { - echo $e->getMessage(), "\n"; -} - -// Garbage bits -try { - posix_mkfifo(__DIR__ . "/testfifo3", 020000); // S_IFCHR bit -} catch (ValueError $e) { - echo $e->getMessage(), "\n"; -} -?> ---EXPECTF-- -posix_mkfifo(): Argument #2 ($permissions) must be between 0 and 0o7777 -posix_mkfifo(): Argument #2 ($permissions) must be between 0 and 0o7777 -posix_mkfifo(): Argument #2 ($permissions) must be between 0 and 0o7777