ContentEntityStorageBase::loadUnchanged() implies that its argument is a valid entity id, but never checks it. Supplying, eg, NULL as an argument can lead to a number of side-effects, such as resetting static cache, calling preload hook for all entities etc, to say nothing about just time it takes. It should return NULL and exit instead.
↧