If, however, upgrading is not an option, then you can override those
class files. Here's what worked for me and my unhelpful host.
Before we get started, doing this means any updates to the files in /
system do not carry over to your new copies. After each update you do
to /system you may need to delete and redo these files.
Any time you encounter that sort of PCRE error, copy the file
mentioned from /system/classes to /user/classes.
So what you'd do would be to copy feedbackhandler.php. I've needed to
tweak that one in the past (my host won't update past the 2003
version, leaving me out of the wonderful world of Unicode), and my
tweak was to comment that entire if statement.
/* if ( preg_match( '/^\p{Z}*$/u', $this-
>handler_vars['content'] ) ) {
Session::error( _t( 'Comment contains only
whitespace/empty comment' ) );
Utils::redirect( $post->permalink );
exit();
}
*/
If you're better versed in the regex options, it should be easy enough
to massage that statement. Make sure to comment what you do, so it's
easier to duplicate later.
Here's a better example, perhaps. Because of my aforementioned Unicode
troubles, I also need to tweak posts.php and utils.php (try doing any
search to see if this affects your site), and
posts.php:
/* working line */
preg_match_all( '/(?<=")(\\w[^"]*)(?=")|(\\w+)/',
$paramset['criteria'], $matches );
// /* non working line */
preg_match_all( '/(?<=")([\p{L}\p{N}]+[^"]*)(?=")|([\p{L}\p{N}]+)/u',
$paramset['criteria'], $matches );
utils.php:
/* working line */ $slug= rtrim( strtolower( preg_replace( '/[^a-
z0-9%_\-]+/i', $separator, $string ) ), $separator );
// /* non working line */ $slug=
rtrim( MultiByte::strtolower( preg_replace( '/[^\p{L}\p{N}%_\-]+/u',
$separator, $string ) ), $separator );
You'll either want to use /* comments around the entire old statement
*/ or make sure it doesn't wrap like this probably did here. The rest
of the file leave alone.
It's not exactly elegant, but it's a nice option to have and I'm glad
ringmaster steered me toward it many revisions ago, lest I stop being
able to update.
mikelietz
On Sep 22, 5:56 pm, Chris Meller <
ch...@doesnthaveone.com> wrote:
> You still need to upgrade your version of PCRE on the server. Your
> phpinfo still says you're using version 6.
>
> Sent from my iPhone
>
> On Sep 22, 2008, at 4:10 PM, "Michael Heilemann" <
heilem...@gmail.com>