Login
User Name:

Password:



Register
Forgot your password?
Template missing: ADMIN_MEMBER_DELETE
Aug 30, 2010, 9:45 pm
By Kline
Making Messes
Aug 5, 2010, 8:46 pm
By Conner
Personal CSS substitution
Aug 5, 2010, 7:00 pm
By Conner
No preview on post edits?
Aug 5, 2010, 11:17 am
By Conner
Video BBCode Buttons
Aug 3, 2010, 11:12 am
By Conner
QSF Portal 1.5
Author: QSF Portal Team
Submitted by: Samson
Ashlander 3 for QSFP 1.4.6
Author: Samson
Submitted by: Samson
QSF Portal 1.4.6
Author: QSF Portal Team
Submitted by: Samson
Ashlander 3 for QSFP 1.4.5
Author: Samson
Submitted by: Samson
QSF Portal 1.4.5
Author: QSF Portal Team
Submitted by: Samson
CommonCrawl, Yandex, Bing

Members: 0
Guests: 0
Stats
Files
Topics
Posts
Members
Newest Member
31
197
873
59
norby500
Affiliates
Arthmoor Quicksilver Forums
View our reviews on Hot Scripts
» QSF Portal » QSF Portal Project » Bugs » [Bug:Permissions] Subscriptio...
Forum Rules | Mark all | Recent Posts

[Bug:Permissions] Subscription check causes crash when editing group perms
< Newer Topic :: Older Topic > Fixed in 1.4.6

Pages:<< prev 1 next >>
Post is unread #1 Apr 24, 2008, 9:06 am
Go to the bottom of the page Go to the top of the page
Banner
Newbie
GroupMembers
Posts6
JoinedApr 19, 2008

This error occured when I created a new category and went to edit the group permissions for it. I was trying to remove all permissions from members to make the category hidden to all but mods/admins, but when I tried to save the permissions I got an error. I then tried to leave only one permission, and got this error:

QSF Portal has exited with an error!

Missing argument 1 for permissions::permissions(), called in /var/www/users/shoie13/forum/admincp/sources/perms.php on line 312 and defined
Warning [2]:
The error was reported on line 124 of /var/www/users/****/forum/lib/perms.php

Code:
121      * @author Geoffrey Dunn <[email protected]>
122      * @since 1.2
123      **/
124     function permissions(&$qsf)
125     {
126         $this->db  = &$qsf->db;
127         $this->pre = &$qsf->pre;


Backtrace:

File: /var/www/users/****/forum/lib/perms.php
Line: 124
Call: See above for details.

File: /var/www/users/****/forum/admincp/sources/perms.php
Line: 312
Call: permissions->permissions()

File: /var/www/users/****/forum/admincp/sources/perms.php
Line: 246
Call: perms->check_subscriptions('group', '')

File: /var/www/users/****/forum/admincp/index.php
Line: 87
Call: perms->execute()



Check status of problem (recommended)
View debug information (advanced)
Return to the board
       
Post is unread #2 Apr 27, 2008, 7:14 pm
Go to the bottom of the page Go to the top of the page


Samson
Administrator
GroupAdministrators
Posts315
JoinedOct 9, 2006
WWW

Christ, that bug again? We'll need to go digging again. I could have sworn this got fixed somewhere along the way. .........................
PDNS-Admin | Sandbox | Arthmoor MUD Hosting Services | The Truth About Medievia: A Saga of Code Theft.

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
       
Post is unread #3 Feb 25, 2010, 8:59 pm
Go to the bottom of the page Go to the top of the page


Samson
Administrator
GroupAdministrators
Posts315
JoinedOct 9, 2006
WWW

Apparently the break from this code did some good. I went back and looked at this issue and it was a DOH moment. The call to the function wasn't passing the argument the constructor requires. Oops. As a result the code also doesn't need to worry about assigning the ->pre or ->db pointer since the constructor already does that.

Index: C:/Code Repositories/QSFP Branch/qsfportal/admincp/sources/perms.php
===================================================================
--- C:/Code Repositories/QSFP Branch/qsfportal/admincp/sources/perms.php	(revision 361)
+++ C:/Code Repositories/QSFP Branch/qsfportal/admincp/sources/perms.php	(revision 362)
@@ -281,9 +281,7 @@
 
 			while ($sub = $this->db->nqfetch($query))//if the user has subscriptions
 			{ 
-				$perms = new permissions;
-				$perms->db = &$this->db;
-				$perms->pre = &$this->pre;
+				$perms = new permissions($this);
 				$perms->get_perms($sub['user_group'], $sub['user_id'], $sub['user_perms']);
 
 				if ($sub['subscription_type'] == 'forum') {
@@ -309,9 +307,7 @@
 
 			while ($sub = $this->db->nqfetch($query))
 			{
-				$perms = new permissions;
-				$perms->db = &$this->db;
-				$perms->pre = &$this->pre;
+				$perms = new permissions($this);
 				$perms->get_perms($sub['user_group'], $sub['user_id'], $sub['group_perms']);
 
 				if ($sub['subscription_type'] == 'forum') {
.........................
PDNS-Admin | Sandbox | Arthmoor MUD Hosting Services | The Truth About Medievia: A Saga of Code Theft.

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
       
Pages:<< prev 1 next >>