After upgrading from 4.2.0rc to 4.2.0 appears some warning

"warning: Delimiter must not be alphanumeric or backslash in /home/ftp/home/dvep.admin/html/impala.2p.cz/includes/theme.inc on line 196"

This line contains a casdade of regular expression :-(.

if ((($block->status && (!$user->uid || !$block->custom)) || ($block->custom && $user->block[$block->module][$block->delta])) && (!$block->path || preg_match($block->path, str_replace("?q=", "", request_uri())))) {

Becauise I dislike them I've downgraded thid line to

if ((($block->status && (!$user->uid || !$block->custom)) || ($block->custom && $user->block[$block->module][$block->delta])) && (!$block->path || preg_match('/'. str_replace('/', '\/', $block->path) .'/', request_uri()))) {   

Request address "http://192.168.10.99/"

It works. Any idea what is problem?

Tomas

Comments

killes@www.drop.org’s picture

The recommended syntax for block path settings changed. You are required to supply delimiters now. Check the docs.

Anonymous’s picture

It's necessary remove leading 'q=' from box path.

Btw. when is required to show box always but "/search" the working path is '((^/$|[^(search)$/]+))'.

killes@www.drop.org’s picture

for the nice regexp! This feature is often requested so I included it in the docs.