Skip to content

Commit

Permalink
Replace deprecated key_exists alias
Browse files Browse the repository at this point in the history
From the PHP manual of array_key_exists:
    For backward compatibility, the following deprecated alias
    may be used: key_exists().
  • Loading branch information
laurentb authored and fabpot committed Sep 26, 2011
1 parent ed02aa9 commit 72e82eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
Expand Up @@ -198,7 +198,7 @@ private function parseXml($node)
$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]);
}
Expand Down

0 comments on commit 72e82eb

Please sign in to comment.