PHP-065 / Beginner
Not using strict mode in in_array()
Why is this a problem?
in_array(0, ['admin']) returns true in PHP 7, bypassing authorization checks.
How to fix it
php
if (in_array($request->input('role'), ['admin', 'editor'], true)) { ... }