]> granicus.if.org Git - php/commitdiff
- Fixed bug #55187, readlink returns weird characters when false result
authorPierre Joye <pajoye@php.net>
Tue, 12 Jul 2011 15:15:17 +0000 (15:15 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 12 Jul 2011 15:15:17 +0000 (15:15 +0000)
ext/standard/link_win32.c

index d7589bbb7b720bf7b9f8b346be7e442f5c5dc3d4..703bcc1e23a243e3090c30a8260aa059af691e77 100644 (file)
@@ -76,6 +76,7 @@ PHP_FUNCTION(readlink)
 
        if (php_sys_readlink(link, target, MAXPATHLEN) == -1) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "readlink failed to read the symbolic link (%s), error %d)", link, GetLastError());
+               RETURN_FALSE;
        }
        RETURN_STRING(target, 1);
 }