From b6745ea43a7c04551b112901882eb7a992773cd6 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 12 Jul 2011 15:15:17 +0000 Subject: [PATCH] - Fixed bug #55187, readlink returns weird characters when false result --- ext/standard/link_win32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/standard/link_win32.c b/ext/standard/link_win32.c index d7589bbb7b7..703bcc1e23a 100644 --- a/ext/standard/link_win32.c +++ b/ext/standard/link_win32.c @@ -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); }