We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1195f27 commit baccc0eCopy full SHA for baccc0e
1 file changed
ext/standard/link.c
@@ -84,7 +84,11 @@ PHP_FUNCTION(linkinfo)
84
Z_PARAM_PATH(link, link_len)
85
ZEND_PARSE_PARAMETERS_END();
86
87
- // TODO Check for empty string
+ if (UNEXPECTED(link_len == 0)) {
88
+ php_error_docref(NULL, E_WARNING, "%s", strerror(ENOENT));
89
+ RETURN_LONG(Z_L(-1));
90
+ }
91
+
92
dirname = estrndup(link, link_len);
93
zend_dirname(dirname, link_len);
94
0 commit comments