Skip to content
Snippets Groups Projects
Commit 811b571c authored by Robin Appelman's avatar Robin Appelman
Browse files

Merge pull request #923 from owncloud/hooks_try_catch

wrap hooks into a try, catch to prevent a faulty app from crashing the request
parents 0c87f666 4301cd7f
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,11 @@ class OC_Hook{
// Call all slots
foreach( self::$registered[$signalclass][$signalname] as $i ) {
call_user_func( array( $i["class"], $i["name"] ), $params );
try {
call_user_func( array( $i["class"], $i["name"] ), $params );
} catch (Exception $e){
OC_Log::write('hook', 'error while running hook (' . $i["class"] . '::' . $i["name"] . '): '.$e->getMessage(), OC_Log::ERROR);
}
}
// return true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment