'Invalid argument' error - in Create User and Preferences

sdiddy

Joined: 2002-11-25
Posts: 9
Posted: Mon, 2002-11-25 17:30

Warning: Invalid argument supplied for foreach() in /***/************/gallery/util.php on line 539

If I am logged in as admin I get the error above on both the Create User and Preferences page next to the 'user is an admin' option, followed by an empty select field.

Also, if I set a user as 'User is an Admin' to Yes and click 'Save', the change is not remembered and the user remains 'User is an Admin' No.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-11-26 04:37

* this is a canned reply *

We need a lot more information in order to figure out what's
wrong with your setup. Please read the help page:

http://gallery.sourceforge.net/help.php

and at the bottom of the page is a list of things that we
need to know in order to understand your problem.

 
sdiddy

Joined: 2002-11-25
Posts: 9
Posted: Tue, 2002-11-26 10:10

the URL to your Gallery
http://www.wavewatch.com.au/gallery

the version of Gallery
latest as of downloading it yesterday

the version of PHP,
4.2.1

the version of Apache,
1.3.24

your operating system and hardware,
FreeBSD 4.5-RELEASE

(if applicable) the web browser and version you are using,
any debug output or clues that you've already discovered.

errors as in first post
<!-- BBCode Start --><IMG SRC="http://www.wavewatch.com.au/gallery-error.GIF"><!-- BBCode End -->

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-11-27 04:51

That's odd. Have you modified the code at all? That option ("User is an admin") shouldn't appear in either the "Create User" or the "Preferences" dialogs.

Have you, by any chance, set the "isAdmin" variable somewhere else in your html_wrapper code? Does this problem still appear if you revert your html_wrapper changes back to the original code?

 
sdiddy

Joined: 2002-11-25
Posts: 9
Posted: Fri, 2002-11-29 15:15

hmm

I have a session variable called isAdministrator? But not isAdmin...

I haven't touched the code but only used the html_wrap files to wrap my own user authentication around it.

So if that menu isn't meant to appear, how do I give particular users admin rights?

 
sdiddy

Joined: 2002-11-25
Posts: 9
Posted: Fri, 2002-11-29 15:18

oops I take that back... it IS isAdmin that I use... DOH! :cry:

So I will need to change that variable name throughout my whole site :mad: :mad: :mad: