summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-07-01 08:54:33 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-07-01 08:54:33 +0200
commit1469177a3a45ed22b64a7b96f840be917b8aab07 (patch)
treef565a1200fc2d84a4707725332ced89c9f0910aa
parentc703a3a63ed2808f92da677e7a798527a8034ae6 (diff)
parent9d3d7ec659985b0d75155ed03a0028c6fcfbf8b4 (diff)
downloadnextcloud-server-1469177a3a45ed22b64a7b96f840be917b8aab07.tar.gz
nextcloud-server-1469177a3a45ed22b64a7b96f840be917b8aab07.zip
Merge pull request #16406 from owncloud/enc-strlenperffix
Small perf tweak in strlen loop
-rw-r--r--lib/private/files/stream/encryption.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
index bfa4d768358..1cef37baf9f 100644
--- a/lib/private/files/stream/encryption.php
+++ b/lib/private/files/stream/encryption.php
@@ -303,7 +303,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