Skip to content
Snippets Groups Projects
Commit b5962456 authored by Jess's avatar Jess
Browse files

Revert "Issue #3172166 by Pooja Ganjage, ekes, Megha_kundar, tstoeckler,...

Revert "Issue #3172166 by Pooja Ganjage, ekes, Megha_kundar, tstoeckler, mbovan, Spokje, alexpott: Element::properties() produces notices if given an array with integer keys"

This reverts commit 089376cf.
parent 750ee280
No related branches found
No related tags found
10 merge requests!2496Issue #3222757 by lauriii, Wim Leers, nod_, rachel_norfolk, itmaybejj,...,!2366Issue #3285105 by Daniel Arend,!2304Issue #3258987: Class "Drupal\Core\Utility\Error" not found in _drupal_error_handler_real() due to bug in PHP 8.1.0-8.1.5,!2148Issue #3270899: Remove Color module from core,!2071Issue #927570: Setting 403 or 404 handler to a page that redirects leads to endless loop,!1975Issue #3269749: losing query params from user to user/login redirect,!1387Draft: Resolve #2511878 "Support enclosure field",!799Issue #3214332: Preview content is broken in Claro.,!558Resolve #3020422 "Toolbar style update",!231Issue #2671162: summary text wysiwyg patch working fine on 9.2.0-dev
......@@ -24,7 +24,7 @@ class Element {
* TRUE of the key is a property, FALSE otherwise.
*/
public static function property($key) {
return is_string($key) && $key[0] == '#';
return $key[0] == '#';
}
/**
......
......@@ -19,7 +19,6 @@ public function testProperty() {
$this->assertTrue(Element::property('#property'));
$this->assertFalse(Element::property('property'));
$this->assertFalse(Element::property('property#'));
$this->assertFalse(Element::property(0));
}
/**
......@@ -30,16 +29,13 @@ public function testProperties() {
'#property1' => 'property1',
'#property2' => 'property2',
'property3' => 'property3',
0 => [],
];
$properties = Element::properties($element);
$this->assertCount(2, $properties);
$this->assertContains('#property1', $properties);
$this->assertContains('#property2', $properties);
$this->assertNotContains('property3', $properties);
$this->assertNotContains(0, $properties);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment