Revert added exception in the sandbox (#3893)
This commit is contained in:
parent
b3848d4833
commit
ef18d1d29e
@ -1316,8 +1316,6 @@ function yourls_include_file_sandbox($file) {
|
||||
require_once $file;
|
||||
yourls_debug_log("loaded $file");
|
||||
return true;
|
||||
} else {
|
||||
throw new \Exception('File not readable');
|
||||
}
|
||||
} catch ( \Throwable $e ) {
|
||||
yourls_debug_log("could not load $file");
|
||||
|
@ -25,7 +25,7 @@ class FileLoaderTest extends PHPUnit\Framework\TestCase {
|
||||
* Load missing file = string
|
||||
*/
|
||||
public function test_load_file_not_exists() {
|
||||
$this->assertIsString( yourls_include_file_sandbox( YOURLS_TESTDATA_DIR . "/" . rand_str() . ".php" ) );
|
||||
$this->assertNull( yourls_include_file_sandbox( YOURLS_TESTDATA_DIR . "/" . rand_str() . ".php" ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user