Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
Dwoo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Common
Dwoo
Commits
7eefb184
Commit
7eefb184
authored
Feb 12, 2013
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch and fix problems with plugin loading caused by stale cache.
parent
2ef09fb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
Loader.php
lib/Dwoo/Loader.php
+9
-2
No files found.
lib/Dwoo/Loader.php
View file @
7eefb184
...
...
@@ -99,8 +99,15 @@ class Dwoo_Loader implements Dwoo_ILoader
*/
public
function
loadPlugin
(
$class
,
$forceRehash
=
true
)
{
// a new class was added or the include failed so we rebuild the cache
if
(
!
isset
(
$this
->
classPath
[
$class
])
||
!
(
include
$this
->
classPath
[
$class
]))
{
// An unknown class was requested (maybe newly added) or the
// include failed so we rebuild the cache. include() will fail
// with an uncatchable error if the file doesn't exist, which
// usually means that the cache is stale and must be rebuilt,
// so we check for that before trying to include() the plugin.
if
(
!
isset
(
$this
->
classPath
[
$class
])
||
!
is_readable
(
$this
->
classPath
[
$class
])
||
!
(
include
$this
->
classPath
[
$class
]))
{
if
(
$forceRehash
)
{
$this
->
rebuildClassPathCache
(
$this
->
corePluginDir
,
$this
->
cacheDir
.
'classpath.cache.d'
.
Dwoo_Core
::
RELEASE_TAG
.
'.php'
);
foreach
(
$this
->
paths
as
$path
=>
$file
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment