summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-19 16:26:32 +0200
committerAnatol Belski <ab@php.net>2014-09-19 16:30:06 +0200
commitd4c5271c0c87c8b0b1a5f8f9c7a43917e2a58039 (patch)
tree43e18a622c2c3d5ded95504a55ddb2f5d50f4f54 /main
parentd1131d4278ce645d359aa74ee549183beff545a4 (diff)
downloadphp-git-d4c5271c0c87c8b0b1a5f8f9c7a43917e2a58039.tar.gz
reverted too much
Diffstat (limited to 'main')
-rw-r--r--main/fopen_wrappers.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index 7afa04c7d5..a4aa10fce8 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -759,11 +759,15 @@ PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, co
cwd_state new_state;
char cwd[MAXPATHLEN];
int copy_len;
- int path_len = (int)strlen(filepath);
+ int path_len;
if (!filepath[0]) {
return NULL;
- } else if (IS_ABSOLUTE_PATH(filepath, path_len)) {
+ }
+
+ path_len = (int)strlen(filepath);
+
+ if (IS_ABSOLUTE_PATH(filepath, path_len)) {
cwd[0] = '\0';
} else {
const char *iam = SG(request_info).path_translated;