UseMuffin / Footprint

CakePHP plugin to allow passing currently logged in user to model layer.
MIT License
95 stars 23 forks source link

Error on non existent element #48

Closed matthewwoollard closed 6 years ago

matthewwoollard commented 6 years ago

<?= $this->Element('does_not_exist') ?> Results in:

Argument 1 passed to Muffin\Footprint\Event\FootprintListener::__construct() must be an instance of Cake\ORM\Entity or null, string given, called in /home/vagrant/Apps/vtta.local/vendor/muffin/footprint/src/Auth/FootprintAwareTrait.php on line 57

ADmad commented 6 years ago

Well then don't try to use non existent element :slightly_smiling_face:. I don't see how it ends up getting a string argument. If you can track down the details a provide a fix a pull request is welcome.