Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jewelhuq's avatar

Getting error on production server

/vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php

preg_match(): Compilation failed: invalid range in character class at offset 28

namespace Illuminate\Routing\Matching;
 
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
 
class UriValidator implements ValidatorInterface
{
    /**
     * Validate a given rule against a route and request.
     *
     * @param  \Illuminate\Routing\Route  $route
     * @param  \Illuminate\Http\Request  $request
     * @return bool
     */
    public function matches(Route $route, Request $request)
    {
        $path = $request->path() === '/' ? '/' : '/'.$request->path();
 
        return preg_match($route->getCompiled()->getRegex(), rawurldecode($path));
    }
}
0 likes
0 replies

Please or to participate in this conversation.