php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch bug55555.patch for Filesystem function related Bug #55555Patch version 2011-08-31 16:16 UTC Return to Bug #55555 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: datibbaw@php.netIndex: ext/standard/link.c =================================================================== --- ext/standard/link.c (revision 315887) +++ ext/standard/link.c (working copy) @@ -70,7 +70,8 @@ ret = php_sys_readlink(link, buff, MAXPATHLEN-1); if (ret == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno)); + /* behaviour of readlink() changed in linux-2.6.39 to return EINVAL instead of ENOENT when the given path is empty */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror((errno != EINVAL || link_len) ? errno : ENOENT)); RETURN_FALSE; } /* Append NULL to the end of the string */ |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Tue Apr 30 09:01:29 2024 UTC |