But if you're not using a paramater you still got this error.
Also it seems that some users would be triggered to uses a non-CodeIgniter function instead.
And that would not be the way to handle this case.
Made some adjustments:
PHP Code:
/**
* Get the request method.
*
* @param boolean $upper Whether to return in upper or lower case.
*
* @return string
*
* The $upper functionality will be removed and this will revert to its PSR-7 equivalent
*
* @codeCoverageIgnore
*/
public function getMethod(bool $upper = false): string
{
if (count(func_get_args()) > 0) {
$warn = 'The $upper functionality will be removed and this will revert to its PSR-7 equivalent';
trigger_error($warn, E_USER_DEPRECATED);
}
return ($upper) ? strtoupper($this->method) : strtolower($this->method);
}
And this trows this when using the $upper-param (in development environments)
Seems a better way?