File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -356,11 +356,13 @@ public function processRuleset($rulesetPath, $depth=0)
356
356
}
357
357
358
358
$ autoloadPath = (string ) $ autoload ;
359
- if (is_file ($ autoloadPath ) === false ) {
360
- $ autoloadPath = Util \Common::realPath (dirname ($ rulesetPath ).DIRECTORY_SEPARATOR .$ autoloadPath );
361
- }
362
359
363
- if ($ autoloadPath === false ) {
360
+ // Try relative autoload paths first.
361
+ $ relativePath = Util \Common::realPath (dirname ($ rulesetPath ).DIRECTORY_SEPARATOR .$ autoloadPath );
362
+
363
+ if ($ relativePath !== false && is_file ($ $ relativePath ) === true ) {
364
+ $ autoloadPath = $ relativePath ;
365
+ } else if (is_file ($ autoloadPath ) === false ) {
364
366
throw new RuntimeException ('The specified autoload file " ' .$ autoload .'" does not exist ' );
365
367
}
366
368
You can’t perform that action at this time.
0 commit comments