summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2020-01-16 14:09:25 +0100
committerDaniel Kesselberg <mail@danielkesselberg.de>2020-01-23 10:25:52 +0100
commit96d1640a373475a02a3e2c261b73a80e46a57e94 (patch)
tree55cdffaa2ca55b0f25dd9ad3b9ef007e0e80cfd6 /lib
parent7af3bcb4bc6a4408f91b193de4b0eadc11ccf70b (diff)
downloadnextcloud-server-96d1640a373475a02a3e2c261b73a80e46a57e94.tar.gz
nextcloud-server-96d1640a373475a02a3e2c261b73a80e46a57e94.zip
Use strpos to check that @ is the first char
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
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;
}