Skip to content

Conversation

elitan
Copy link
Contributor

@elitan elitan commented Aug 28, 2014

file_exists() does not work as expected when config.php is included from another path. From upgrade/ for instance.

@ext
Copy link
Member

ext commented Aug 28, 2014

Do you get an error without this? Most of the time PHP searches relative to the current file (in addition to a few other locations). What platform and versions?

The patch has the (nasty) side-effect of changing the working directory.

I would rather suggest something as following:

$basedir = dirname(__FILE__);
file_exists("$basedir/...")
require("$basedir/...");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants