Posted by Anji (Anji), 23 August 2002When submitting a form to append to a text file, I get the error, "WARNING: REG_EMPTY" and have been unable to find any mention of the meaning of this in PHP references. Anybody any ideas?
Posted by John_Moylan (John_Moylan), 24 August 2002Don't quote this as a definitive answer, but I'll have a go.
First off, did the error give you a line number? and if so did it happen to be near a regular expression?
I think whats happening is you've passed an empty string to ereg().
Back in a few minutes, I'll go and check...
Posted by John_Moylan (John_Moylan), 24 August 2002yep, seems so.
I can replicate this error with the code below
as you can see there is no regular expression in ereg (the regex should be the first argument) and it throws the error below.
: REG_EMPTY in /home/moylan/test.php on line 3
Have you mistyped a variable?
Do let me know what it was when you fix it though.
Posted by Anji (Anji), 28 August 2002Thanks John, it was indeed a problem with an empty string being passed!
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho