[BUGFIX] Ensure argument is an array in ContentObjectRenderer

This patch ensures that at least an empty array is passed to the
array_replace_recursive function to avoid warnings during rendering.

Inspired by Markus Klein

Resolves: #62139
Releases: master, 6.2
Change-Id: I854b39d7ff54c213bda00dd9060c1e5ee89914eb
Reviewed-on: http://review.typo3.org/33242
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[TASK] Remove the "@todo define visibility"

The "@todo Define visibility" is not very helpful because:

 * Nobody knows what breaks if changing the visibility
 * The code is flooded with todos which makes it hard
   to work with in an IDE

During ACME it was decided to remove the @todo again.

Resolves: #61957
Releases: master
Change-Id: I0caa9756bba326dc132b6a2dabe79218c53a32c8
Reviewed-on: http://review.typo3.org/33044
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
[BUGFIX] Wrong usage of count on SimpleXMLElement

SimpleXMLElement comes with its own count implementation,
so no need to call count() on that Element.
Further I have updated some type annotations.

Resolves: #62130
Releases master,6.2
Change-Id: I2d52d54172d2898a89f0649330dc37ebddfe40c7
Reviewed-on: http://review.typo3.org/33250
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
[TASK] Remove the "@todo define visibility" in ext:frontend

The "@todo Define visibility" is not very helpful because:

 * Nobody knows what breaks if changing the visibility
 * The code is flooded with todos which makes it hard
   to work with in an IDE

During ACME it was decided to remove the @todo again.

Resolves: #62168
Related: #61957
Releases: master
Change-Id: I301b31617a2272bd991578c065155773b458394d
Reviewed-on: http://review.typo3.org/33268
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>