mirror of
https://github.com/php/php-src.git
synced 2026-04-19 22:11:12 +02:00
chdir returns 0 on success, compare against it
This commit is contained in:
@@ -212,7 +212,7 @@ PHP_FUNCTION(chdir)
|
||||
|
||||
ret = V_CHDIR((*arg)->value.str.val);
|
||||
|
||||
if (ret < 0) {
|
||||
if (ret != 0) {
|
||||
php_error(E_WARNING, "ChDir: %s (errno %d)", strerror(errno), errno);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user