If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Error in admin.class.php  XML
Forum Index » Support Forum
Author Message
Anonymous



I found this small error in the lib/admin.class.php.
If you have magic_quotes turned off, you can't update entries in the admin section if there is any single quote in any field.
Simply add this line

just after


and the problem is solved.
Webmaster
Site Admin
[Avatar]

Joined: 10/01/2002 23:32:17
Messages: 82
Offline

fixed.
Yes, it's still not 100% bug free.
[Email] [WWW]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

I replaced the whole of

with

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



You forgot to add the reset($_POST) function. You don't where the array pointer is. You have to use reset() if you want to traverse the array again using each.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

There should be no need to reset the array as it has not been looped. I will test it with magic quotes turned off on my test server but it worked fine on my website.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



The script has already looped the each($_POST). It's in the first lines of the admin.php.
You wrote the code better, but that doesn't solve the bug I found it on my server.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

I'll throw in a reset then. From what you have said about the bug something must be causing a problem earlier in the script when magic quotes are off. I'll go through code later and see if I can't tighten anything up.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



When magic quotes are on, those lines aren't needed so you don't notice the bug.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Actually I see what you are on about. I have gone back to the original code as I felt mine increased processing time because it had to read the variable with each item in the array. Anyway I am now using

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Obviously I meant

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum