Fixed logic error Amazon_S3StorageBackend
This commit is contained in:
parent
8c7ae6c890
commit
7b9efb988f
|
@ -65,7 +65,7 @@ class Amazon_S3StorageBackend extends StorageBackend
|
||||||
$slashPos = strpos($prefix, "/");
|
$slashPos = strpos($prefix, "/");
|
||||||
if (($slashPos === FALSE) || //Slash must exist
|
if (($slashPos === FALSE) || //Slash must exist
|
||||||
($slashPos != 2) || //Slash must be the third character
|
($slashPos != 2) || //Slash must be the third character
|
||||||
(strlen($prefix) > $slashPos) || //String must have something after the first slash
|
(strlen($prefix) <= $slashPos) || //String must have something after the first slash
|
||||||
(substr_count($prefix, "/") != 2)) //String must have two slashes
|
(substr_count($prefix, "/") != 2)) //String must have two slashes
|
||||||
{
|
{
|
||||||
throw new Exception("Invalid file prefix in " . __FUNCTION__);
|
throw new Exception("Invalid file prefix in " . __FUNCTION__);
|
||||||
|
|
Loading…
Reference in New Issue