Aktywne Wpisy

Torian +428

Też tak macie, że na wyjazdach wybieracie w sklepach jak najwięcej lokalnych produktów? xd
źródło: temp_file5848455646279351111
Pobierzrobisz tak?
- tak, jeszcze jak 63.8% (333)
- nie, kupuję znane, sprawdzone 36.2% (189)





"Message: 'preg_match(): Compilation failed: invalid range in character class at offset 19'".
Prawdopodobnie gdzieś tutaj:
public function add(string $route, array $params = [])
{
/* Convert the route to a regular expression: escape forward slashes */
$route = preg_replace('/\//', '\/', $route);
/* Convert variables e.g. {controller} {action} */
$route = preg_replace('/\{([a-z]+)\}/', '(?P<\1>[a-z-]+)', $route);
/* Convert variables with custom regular expressions e.g. {id:\d+} */
$route = preg_replace('/\{([a-z]+):([^\}]+)\}/', '(?P<\1>\2)', $route);
/* Add start and end delimiters, and case insensitive flag */
$route = '/^' . $route . '$/i';
$this->routes[$route] = $params;
}
Czy jest w stanie ktoś pomóc?
#php #programowanie
Przecież, w tym fragmencie co wrzuciłeś
preg_matchnawet nie występuje ;)No ale bez wiedzy co jest w
$routeto niewiele można z tego wywnioskować.Ale prawdopodobnie masz starszy skrypt, i niewłaściwie wyescapowany regexp tam trafia bo od php 7.3 były zmiany drobne afair.