We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 517c993 commit 4c0d2b6Copy full SHA for 4c0d2b6
ext/posix/posix.c
@@ -655,14 +655,9 @@ PHP_FUNCTION(posix_mknod)
655
}
656
657
if ((mode & S_IFCHR) || (mode & S_IFBLK)) {
658
- if (ZEND_NUM_ARGS() == 2) {
659
- php_error_docref(NULL, E_WARNING, "For S_IFCHR and S_IFBLK you need to pass a major device kernel identifier");
660
- RETURN_FALSE;
661
- }
662
if (major == 0) {
663
- php_error_docref(NULL, E_WARNING,
664
- "Expects argument 3 to be non-zero for POSIX_S_IFCHR and POSIX_S_IFBLK");
665
+ zend_argument_value_error(3, "cannot be 0 for the POSIX_S_IFCHR and POSIX_S_IFBLK modes");
+ RETURN_THROWS();
666
} else {
667
#if defined(HAVE_MAKEDEV) || defined(makedev)
668
php_dev = makedev(major, minor);
0 commit comments