In my module I use the PCRE functions preg_match_all. I just want to check how many instances of a pattern a text contains and so I don't define a $matches array. When I do this I get the warning:

"Warning: preg_match_all() expects at least 3 parameters, 2 given in _molmeth_check_before_submit() "

I've been looking at this: http://www.php.net/manual/en/function.preg-match-all.php

and I interpret it as only the two first parameters are mandatory. Have I missunderstood? Or can the warning be generated for some other reason?

Comments

justageek’s picture

the $matches array became option in php 5.4