fix for accessing non object
This commit is contained in:
parent
3eae26143f
commit
dc8164a3f0
1 changed files with 2 additions and 1 deletions
|
@ -1243,13 +1243,14 @@ class Share {
|
||||||
'token' => $token,
|
'token' => $token,
|
||||||
'run' => $run
|
'run' => $run
|
||||||
);
|
);
|
||||||
|
|
||||||
$run = \OC_Hook::emit(
|
$run = \OC_Hook::emit(
|
||||||
'OCP\Share'
|
'OCP\Share'
|
||||||
, 'pre_shared'
|
, 'pre_shared'
|
||||||
, $params
|
, $params
|
||||||
);
|
);
|
||||||
// If hook execution didn't encounter errors
|
// 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';
|
$message = 'Sharing '.$itemSource.' failed, because pre share hooks failed';
|
||||||
\OC_Log::write('OCP\Share', $message, \OC_Log::ERROR);
|
\OC_Log::write('OCP\Share', $message, \OC_Log::ERROR);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue