From 9d3d7ec659985b0d75155ed03a0028c6fcfbf8b4 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 18 May 2015 13:27:22 +0200 Subject: [PATCH] Small perf tweak in strlen loop --- lib/private/files/stream/encryption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php index 0262405f36..951d3b9e86 100644 --- a/lib/private/files/stream/encryption.php +++ b/lib/private/files/stream/encryption.php @@ -299,7 +299,7 @@ class Encryption extends Wrapper { $length = 0; // loop over $data to fit it in 6126 sized unencrypted blocks - while (strlen($data) > 0) { + while (isset($data[0])) { $remainingLength = strlen($data); // set the cache to the current 6126 block