Re: [habari-dev] Re: don't know what to do with error "InvalidArgumentException: Bitmask cannot get non-existent flag"

21 views
Skip to first unread message

Chris Meller

unread,
Mar 27, 2013, 9:31:38 AM3/27/13
to Habari Dev
You said you were using .8. The upgrade to 0.9 should be pretty easy, can you set up a separate test copy and try dropping in the new system directory and see if the error persists?


On Wed, Mar 27, 2013 at 9:14 AM, Valentin <valek...@gmail.com> wrote:
No ideas? I've got no clue what to do, it's on a live website and it's a very big problem.

Best regards.


On Saturday, 23 March 2013 19:21:26 UTC+1, Valentin wrote:
Hey all,

I suddenly got this error while working on a habari install of version .8 :

InvalidArgumentException: Bitmask cannot get non-existent flag in /var/www/virtual/one/html/system/classes/bitmask.php line 150

It's only appearing when I'm logged in as the admin account, rest of site and other accounts work fine.

.. As I didn't want to dive into which of my newest changes in the source code of some of my plugins might have caused this message, I simply hard-resetted via git to the previously ok version, but even then nothing changed. I re-started the PHP interpreter, but that also changed nothing.

Does anyone have any ideas as to what might be the problem?

Thanks,

Valentin

--
--
To post to this group, send email to habar...@googlegroups.com
To unsubscribe from this group, send email to habari-dev-...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/habari-dev
---
You received this message because you are subscribed to the Google Groups "habari-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to habari-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Owen Winkler

unread,
Mar 27, 2013, 9:40:16 AM3/27/13
to habar...@googlegroups.com
On 3/23/2013 2:21 PM, Valentin wrote:
>
> InvalidArgumentException: Bitmask cannot get non-existent flag in
> /var/www/virtual/one/html/system/classes/bitmask.php line 150

This error is caused when attempting to access a flag on a bitmask that
doesn't exist. For example, if you have a Habari permission bitmask
named $access, which only has the flags "read,edit,delete,create" on it,
and you tried to do this:

if($access->not_present) {...}

It would throw the exception mentioned.

This can also happen if some variable is defined as a Bitmask, but the
Bitmask in question never had its flags set:

$bitmask = new Bitmask();
if($bitmask->foo) {...} // Causes an exception for any "foo"

To debug this, you'd need to see a stack trace to find out what line in
the code causes the exception to be thrown. Check out this page in the
wiki for tips on how to display the call stack when there are errors:

http://wiki.habariproject.org/en/Debugging_Tips

If you find out what code is doing it, and need more help, come on back.

Owen

Valentin Kotov

unread,
Mar 28, 2013, 7:13:44 AM3/28/13
to habar...@googlegroups.com

Thanks Chris and Owen, I'll try that and get back to you.

--
--
To post to this group, send email to habar...@googlegroups.com
To unsubscribe from this group, send email to habari-dev-unsubscribe@googlegroups.com

For more options, visit this group at http://groups.google.com/group/habari-dev
--- You received this message because you are subscribed to a topic in the Google Groups "habari-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/habari-dev/ywmN4A9HP-I/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to habari-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages