Re: REG_EMPTY error

From: Date: Sat, 23 Jun 2001 06:49:52 +0000
Subject: Re: REG_EMPTY error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-54961@lists.php.net to get a copy of this message
This error means that you are using an empty string as your pattern for the regular expression. Throw a test like this in before the eregi_replace calls to check if this is the case: if ('' === $r[1]) { echo '$r[1] is an empty string'; } else if (NULL === $r[1]) { echo '$r[1] is NULL'; } --zak ----- Original Message ----- From: "Aral Balkan" <aral@aralbalkan.com> To: <php-general@lists.php.net> Sent: Friday, June 22, 2001 7:25 PM Subject: [PHP] REG_EMPTY error > Hi all, > > I'm getting the following error when I try to load complex web pages with a > version of Hans Anderson's class.browser that I've modified to translate > relative links to absolute links (as well as images, flash object / embed > links). It's going to be part of a larger templating class (I'm going to > merge it into Stefan Bocskai Quicktemplate.) > > In any case, here's the error I'm getting: > > Warning: REG_EMPTY:?empty (sub)expression in > c:\foxserv\www\browser.class\class.browser.php on line 388 > > On line 388, I'm doing an eregi_replace: > $absolute_links[] = eregi_replace($r[1], $this_url, $array[$i]); > > I'd appreciate some help if anyone's run into this problem before. > > Thanks, Aral :) > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#54961) next »