diff --git a/core/lib/Drupal/Core/Path/Path.php b/core/lib/Drupal/Core/Path/Path.php index a7fd55a..ed5aa31 100644 --- a/core/lib/Drupal/Core/Path/Path.php +++ b/core/lib/Drupal/Core/Path/Path.php @@ -130,7 +130,9 @@ public function load($conditions) { * An array of criteria. */ public function delete($conditions) { - $path = $this->load($conditions); + if (!$path = $this->load($conditions)) { + return; + } $query = $this->connection->delete('url_alias'); foreach ($conditions as $field => $value) { $query->condition($field, $value); diff --git a/core/modules/path/lib/Drupal/path/Tests/PathFieldCRUDTest.php b/core/modules/path/lib/Drupal/path/Tests/PathFieldCRUDUnitTest.php similarity index 97% rename from core/modules/path/lib/Drupal/path/Tests/PathFieldCRUDTest.php rename to core/modules/path/lib/Drupal/path/Tests/PathFieldCRUDUnitTest.php index ac54ba4..c5fd850 100644 --- a/core/modules/path/lib/Drupal/path/Tests/PathFieldCRUDTest.php +++ b/core/modules/path/lib/Drupal/path/Tests/PathFieldCRUDUnitTest.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\path\Tests\PathFieldCRUDTest. + * Contains Drupal\path\Tests\PathFieldCRUDUnitTest. */ namespace Drupal\path\Tests; @@ -12,7 +12,7 @@ /** * Tests path field CRUD operations. */ -class PathFieldCRUDTest extends DrupalUnitTestBase { +class PathFieldCRUDUnitTest extends DrupalUnitTestBase { /** * Modules to enable.