Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
expire
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
drupal.org
expire
Commits
f724c073
Commit
f724c073
authored
Dec 05, 2014
by
davereid
Committed by
Spleshka
Dec 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #2337057 by petermallett, Dave Reid, Spleshka: Fatal error if a handler is not found
parent
84d22e29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
expire.module
expire.module
+10
-2
No files found.
expire.module
View file @
f724c073
...
...
@@ -250,7 +250,9 @@ function expire_menu_link_insert($link) {
function
expire_execute_expiration
(
$type
,
$object
,
$action
)
{
$status
=
variable_get
(
'expire_status'
,
EXPIRE_STATUS_DISABLED
);
if
(
$status
)
{
return
_expire_get_expiration_handler
(
$type
)
->
expire
(
$object
,
$action
);
if
(
$handler
=
_expire_get_expiration_handler
(
$type
))
{
$handler
->
expire
(
$object
,
$action
);
}
}
return
FALSE
;
}
...
...
@@ -276,7 +278,13 @@ function _expire_get_expiration_handler($type) {
}
$class
=
variable_get
(
'expire_handler_'
.
$type
,
'Expire'
.
implode
(
''
,
$class_bits
));
$cache_objects
[
$type
]
=
class_exists
(
$class
)
?
new
$class
()
:
FALSE
;
if
(
class_exists
(
$class
))
{
$cache_objects
[
$type
]
=
new
$class
();
}
else
{
$cache_objects
[
$type
]
=
FALSE
;
trigger_error
(
"Unable to find expiration handler class
$class
for type
$type
."
,
E_USER_ERROR
);
}
}
return
$cache_objects
[
$type
];
}
...
...
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