When supplying the ruleset option with an unknown ruleset to \Cocur\Slugify\Slugify::__construct, the following error occurs:
Notice: Undefined index: foo in /path/to/vendor/cocur/slugify/src/RuleProvider/DefaultRuleProvider.php on line 8616
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Cocur\Slugify\Slugify::addRules() must be of the type array, null given, called in /path/to/vendor/cocur/slugify/src/Slugify.php on line 178 and defined in /path/to/vendor/cocur/slugify/src/Slugify.php:162
This PR detects this and throws and OutOfBoundsException instead.
When supplying the
ruleset
option with an unknown ruleset to\Cocur\Slugify\Slugify::__construct
, the following error occurs:This PR detects this and throws and
OutOfBoundsException
instead.