Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa5b6fd

Browse files
committed
use func_num_args
1 parent fb3a7a2 commit fa5b6fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ protected function isCircularReference($object, &$context)
192192
*/
193193
protected function handleCircularReference($object/*, ?string $format = null, array $context = array()*/)
194194
{
195-
$format = @func_get_arg(1) ?: null;
196-
$context = @func_get_arg(2) ?: array();
195+
$format = \func_num_args() > 1 ? func_get_arg(1) : null;
196+
$context = \func_num_args() > 2 ? func_get_arg(2) : array();
197197

198198
if ($this->circularReferenceHandler) {
199199
return \call_user_func($this->circularReferenceHandler, $object, $format, $context);

0 commit comments

Comments
 (0)