preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash – CakePHP

Hey everyone,

Ran into the following error while I was mucking around with CakePHP today:


preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash

The error seemed a little weird as I wasn’t using any regex. It turned out that it was because of my custom validation methods. I had marked them as private instead of public. A bit of an ambiguous error message so hopefully this will be able to help some of you out!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s