Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Buggy Ormauth ?
  • 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?
  • Auth::has_access('blog.posts');   returns true, though.
  • 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))
  • HarroHarro
    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.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion