00866: Blocklist displays error

Summary: Blocklist displays error
Created: 2007-01-16 15:09
Status: Closed - not a bug
Category: Bug
From: Simon
Assigned:
Priority: 5
Version: 2.0 beta 22
OS:

Description: I just added

  block:/foren

and a matching (there should be a f after the colon)

  block:oren/

to the blocklist

Now a page preview shows

Warning: preg_match() [function.preg-match]: No ending delimiter '/' found in /home/pmichaud/pmwiki/scripts/blocklist.php on line 163

Warning: Cannot modify header information - headers already sent by (output started at /home/pmichaud/pmwiki/scripts/blocklist.php:163) in /home/pmichaud/pmwiki/pmwiki.php on line 940

The message also flashes up when saving a page.

I've removed

 block:/foren

for now

When I think about it this is probably because it is expecting a regular expression, and thus a matching terminating slash, hmmm, what to do

PS IS there any way of doing a search that displays all pages with unapproved links>

(clever really, the way the blocklist page doesn't check itself!)


The only way to block a phrase that begins with a slash is to use a regular expression for it. Thus use:

block:/\/foren/

This isn't really a "bug" -- it's just the way that blocklist entries have been designed to work.

Pm January 16, 2007, at 04:33 PM

OK, just the mode of failure was a bit rough,

if there is no trailing slash perhaps it should be treated as a normal literal. Simon