summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2020-02-06 21:31:03 +0100
committerGitHub <noreply@github.com>2020-02-06 21:31:03 +0100
commit3a0bfbd55845257aea963b6ae894eff2289a044c (patch)
tree9f7cb0b7b3f1591c55d78747ae4f3a3297449b86 /lib
parent368b401ff5ce51cfd3040bdde87a4e6ca44f3d76 (diff)
parent96d1640a373475a02a3e2c261b73a80e46a57e94 (diff)
downloadnextcloud-server-3a0bfbd55845257aea963b6ae894eff2289a044c.tar.gz
nextcloud-server-3a0bfbd55845257aea963b6ae894eff2289a044c.zip
Merge pull request #18926 from nextcloud/fix/18689/int-array-access
Array access on int will fail on php7.4
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/OCS/BaseResponse.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AppFramework/OCS/BaseResponse.php b/lib/private/AppFramework/OCS/BaseResponse.php
index 60a4fb57ab4..68456289be5 100644
--- a/lib/private/AppFramework/OCS/BaseResponse.php
+++ b/lib/private/AppFramework/OCS/BaseResponse.php
@@ -126,7 +126,7 @@ abstract class BaseResponse extends Response {
*/
protected function toXML(array $array, \XMLWriter $writer) {
foreach ($array as $k => $v) {
- if ($k[0] === '@') {
+ if (\is_string($k) && strpos($k, '@') === 0) {
$writer->writeAttribute(substr($k, 1), $v);
continue;
}