From: Florin Peter Date: Fri, 10 May 2013 22:22:58 +0000 (+0200) Subject: fix for accessing non object X-Git-Tag: v6.0.0alpha2~743^2~96 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dc8164a3f09d45b8df195df791fa21ddbd2e510d;p=nextcloud-server.git fix for accessing non object --- diff --git a/lib/public/share.php b/lib/public/share.php index 17fdd338610..418c0028ee5 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -1243,13 +1243,14 @@ class Share { 'token' => $token, 'run' => $run ); + $run = \OC_Hook::emit( 'OCP\Share' , 'pre_shared' , $params ); // If hook execution didn't encounter errors - if ( $run !== false && !$run->run ) { + if ( isset($run->run) && !$run->run ) { $message = 'Sharing '.$itemSource.' failed, because pre share hooks failed'; \OC_Log::write('OCP\Share', $message, \OC_Log::ERROR); return false;