Skip to content
Snippets Groups Projects
Commit 1f37e575 authored by Angie Byron's avatar Angie Byron
Browse files

Revert "Issue #1813832 by andypost: Fixed Allow use '0' as id for entity."

This reverts commit f8673ac4.

Needs more discussion.
parent f8673ac4
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -51,8 +51,7 @@ public function getOriginalID() {
* since each configuration entity is unique.
*/
final public function isNew() {
$id = $this->id();
return !isset($id);
return !$this->id();
}
/**
......
......@@ -91,8 +91,7 @@ public function uuid() {
* Implements EntityInterface::isNew().
*/
public function isNew() {
$id = $this->id();
return !empty($this->enforceIsNew) || !isset($id);
return !empty($this->enforceIsNew) || !$this->id();
}
/**
......
......@@ -78,16 +78,13 @@ function testCRUD() {
// Rename the configuration entity's ID/machine name.
$this->assertLinkByHref('admin/structure/config_test/manage/' . $id);
$edit = array(
'id' => '0',
'id' => strtolower($this->randomName()),
'label' => $label3,
);
$this->drupalPost('admin/structure/config_test/manage/' . $id, $edit, 'Save');
$this->assertResponse(200);
$this->assertNoText($label1);
$this->assertText($label3);
$this->drupalPost('admin/structure/config_test/manage/0/delete', array(), 'Delete');
$this->assertResponse(200);
$this->assertNoText($label3);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment