diff -u b/includes/common.inc b/includes/common.inc --- b/includes/common.inc +++ b/includes/common.inc @@ -7922,7 +7922,7 @@ */ function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE) { if ($ids != FALSE && !is_array($ids)) { - throw new \InvalidArgumentException("The second argument passed to " . __FUNCTION__ . " must be FALSE or an array."); + throw new \InvalidArgumentException("The second argument passed to entity_load() must be FALSE or an array."); } if ($reset) { entity_get_controller($entity_type)->resetCache(); diff -u b/modules/simpletest/tests/entity_crud.test b/modules/simpletest/tests/entity_crud.test --- b/modules/simpletest/tests/entity_crud.test +++ b/modules/simpletest/tests/entity_crud.test @@ -50,7 +50,7 @@ entity_load('node', 1); } catch (InvalidArgumentException $exception) { - $pass = ($exception->getMessage() == t('The second argument passed to entity_load must be FALSE or an array.')); + $pass = ($exception->getMessage() == 'The second argument passed to entity_load() must be FALSE or an array.'); } $this->assertTrue($pass, "Arguments are checked in entity_load()."); }