Browse Source

Replace deprecated key_exists alias

From the PHP manual of array_key_exists:
    For backward compatibility, the following deprecated alias
    may be used: key_exists().
Laurent Bachelier 13 năm trước cách đây
mục cha
commit
72e82eb595
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Symfony/Component/Serializer/Encoder/XmlEncoder.php

+ 1 - 1
src/Symfony/Component/Serializer/Encoder/XmlEncoder.php

@@ -198,7 +198,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
                     $data[] = $tmp;
                     $data[] = $value;
                 }
-            } elseif (key_exists($key, $data)) {
+            } elseif (array_key_exists($key, $data)) {
                 if ((false === is_array($data[$key]))  || (false === isset($data[$key][0]))) {
                     $data[$key] = array($data[$key]);
                 }