News:

Join the Facebook Fan Page.

Main Menu

Show permission error

Started by jvter, December 05, 2014, 03:23:18 AM

Previous topic - Next topic

jvter

Hi,
In admin mode I get the following message when cklicing on Profile info - Show permissions I get the following error:  'Wrong value type sent to the database. Array of integers expected. (group_list)'.
https://www.eczm.eu/forum/index.php?action=profile;area=permissions;u=113

Apply Filter: Only show the errors with the same message

Wrong value type sent to the database. Array of integers expected. (group_list)
Function: showPermissions

Apply Filter: Only show the errors from this file

File: %Path%/Forum/Sources/Profile-View.php
Line: 1770

Any idea how to prevent this?

Kindred

first -- is that the ACTUAL error or did you replace the actual path with the %PATH% text (generally, using **** or .... works best to indicate that you replaced something)

second -- smf version? mods installed?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Odd, no mod I can think of would edit that query.

jvter

Installed Mods:
Additional Profile Permissions    1.0.0    
Add Social Media Icons To Profiles 1.2.0    
Alternative Menu With Top Menu Icon & Button Remover 1.4.2    
Board Icons 1.0
Latest Member(s) 1.0.5
Mobile Device Detect 0.2.2
SMF Notify Group 2.2
Recount Member Posts 1.1
Remove XHTML, RSS & WAP2 Links in Footer v1.1
Styled Maintenance Mode Message 1.0

You are correct I should have used *** isnstead of %Path%
It actually reads:

https://www.eczm.eu/forum/index.php?action=profile;area=permissions;u=113
Wrong value type sent to the database. Array of integers expected. (group_list)
Apply Filter: Only show the errors from this file
File: E:/eczm.eu/wwwroot/Forum/Sources/Profile-View.php
Line: 1770

Kindred

alright...  that's better. :)


next question...   please post lines 1750-1780 of your Profile-View.php file?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

jvter

#5
1750 to 1780:


);

// If you're an admin we know you can do everything, we might as well leave.
$context['member']['has_all_permissions'] = in_array(1, $curGroups);
if ($context['member']['has_all_permissions'])
return;

$denied = array();

// Get all general permissions.
$result = $smcFunc['db_query']('', '
SELECT p.permission, p.add_deny, mg.group_name, p.id_group
FROM {db_prefix}permissions AS p
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = p.id_group)
WHERE p.id_group IN ({array_int:group_list})
ORDER BY p.add_deny DESC, p.permission, mg.min_posts, CASE WHEN mg.id_group < {int:newbie_group} THEN mg.id_group ELSE 4 END, mg.group_name',
array(
'group_list' => $curGroups,
'newbie_group' => 4,
)
);
while ($row = $smcFunc['db_fetch_assoc']($result))
{
// We don't know about this permission, it doesn't exist :P.
if (!isset($txt['permissionname_' . $row['permission']]))
continue;

if (empty($row['add_deny']))
$denied[] = $row['permission'];

// Permissions that end with _own or _any consist of two parts.

Kindred

hmmm...   I don't see anything in that code which is incorrect... and it should not be generating an error there...

the only potential mods that could affect this, by accident would seem to be
SMF Notify Group 2.2
or possibly Additional Profile Permissions    1.0.0

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: