If you get error like:
preg_match() [<a href=‘function.preg-match’>function.preg-match</a>]: Compilation failed: missing terminating ] for character class at offset 30
/protected/modules/rights/components/RAuthorizer.php(448)
That indicates your php setup includes some unusual functions that may cause problems. So, I modify the file to avoid this problem, and may help some guys.Just a advice, if you have a better solution, just share to us.
File:rights\components\RAuthorizer.php
Line:447-450
Source:
foreach( $functions as $f ){
if(preg_match('/'.$f.'\ *\({1}/', $code)>0 )
return null; // Function call found, not safe for eval.
}
To:
foreach( $functions as $f ){
if(preg_match('/^[a-zA-Z_][a-zA-Z_0-9]*$/i', $f) && preg_match('/'.$f.'\ *\({1}/', $code)>0 )
return null; // Function call found, not safe for eval.
}