Commit eb437c64 authored by Andreas Hennings's avatar Andreas Hennings
Browse files

Issue #3270010 by donquixote: PHP 7.4+: Avoid array offset on integer when checking array keys.

parent d88c9880
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ abstract class Configurator_GroupBase extends Configurator_GroupGrandBase {
   * @return $this
   */
  public function keySetConfigurator($key, ConfiguratorInterface $configurator, $label) {
    if ('#' === $key[0]) {
    if ($key !== '' && is_string($key) && $key[0] === '#') {
      throw new \InvalidArgumentException("Key '$key' must not begin with '#'.");
    }
    $this->configurators[$key] = $configurator;
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ class DataUtil {
   */
  private static function arrayStripDangerousKeysRecursive(array &$data) {
    foreach ($data as $key => $value) {
      if ($key !== '' && $key[0] === '#') {
      if ($key !== '' && is_string($key) && $key[0] === '#') {
        unset($data[$key]);
      }
      elseif (is_array($value)) {