mirror of
https://github.com/filp/whoops.git
synced 2026-09-14 03:36:38 +00:00
Improved resources
This commit is contained in:
@@ -373,7 +373,7 @@ class PrettyPageHandler extends Handler
|
||||
);
|
||||
}
|
||||
|
||||
$this->searchPaths[] = $path;
|
||||
array_unshift($this->searchPaths, $path);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -414,10 +414,10 @@ class PrettyPageHandler extends Handler
|
||||
return $this->resourceCache[$resource];
|
||||
}
|
||||
|
||||
// Search through available search paths, in reverse order,
|
||||
// until we find the resource we're after:
|
||||
for($i = count($this->searchPaths) - 1; $i >= 0; $i--) {
|
||||
$fullPath = $this->searchPaths[$i] . "/$resource";
|
||||
// Search through available search paths, until we find the
|
||||
// resource we're after:
|
||||
foreach($this->searchPaths as $path) {
|
||||
$fullPath = $path . "/$resource";
|
||||
|
||||
if(is_file($fullPath)) {
|
||||
// Cache the result:
|
||||
|
||||
Reference in New Issue
Block a user