Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 373a471

Browse files
committed
Throw exception on error
1 parent 46e425d commit 373a471

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/plugins/access.inbox/InboxAccessDriver.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121
namespace Pydio\Access\Driver\StreamProvider\Inbox;
2222

23+
use Pydio\Access\Core\Exception\FileNotFoundException;
2324
use Pydio\Access\Core\Model\AJXP_Node;
2425
use Pydio\Access\Core\Filter\ContentFilter;
2526
use Pydio\Access\Driver\StreamProvider\FS\FsAccessDriver;
@@ -98,6 +99,7 @@ public function loadRepositoryInfo(ContextInterface $ctx, &$data){
9899
/**
99100
* @param string $nodePath Url of a node
100101
* @return array|mixed
102+
* @throws FileNotFoundException
101103
*/
102104
public static function getNodeData($nodePath){
103105
$nodeObject = new AJXP_Node($nodePath);
@@ -106,6 +108,9 @@ public static function getNodeData($nodePath){
106108
return ['stat' => stat(ApplicationState::getTemporaryFolder())];
107109
}
108110
$allNodes = self::getNodes($nodeObject->getContext(), false);
111+
if(!isSet($allNodes[$basename])){
112+
throw new FileNotFoundException($basename);
113+
}
109114
$nodeData = $allNodes[$basename];
110115
if(!isSet($nodeData["stat"])){
111116
if(in_array(pathinfo($basename, PATHINFO_EXTENSION), ["error", "invitation"])){

0 commit comments

Comments
 (0)