Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Auth
Buggy Ormauth ?
sdekkers
July 2013
If i run
Auth::has_access('blog.[posts,comments]');
I get this error:
Fuel\Core\PhpErrorException [ Warning ]: preg_match() expects parameter 2 to be string, array given..
What do I do wrong?
sdekkers
July 2013
Auth::has_access('blog.posts'); returns true, though.
sdekkers
July 2013
Fixed it myself, edited this line in /fuel/packages/auth/classes/auth/acl/ormacl.php
if (preg_match('#(.*)?\[(.*)?\]#', $condition[1], $matches))
to
if (!is_array($condition[1]) and preg_match('#(.*)?\[(.*)?\]#', $condition[1], $matches))
Harro
July 2013
Accepted Answer
Can you create an issue for this at
https://github.com/fuel/auth/issues
documenting this case, so someone can fix it? We don't use the forums for bug reports.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
July 2013
sdekkers
July 2013