Backend Development

Need PHP Help

Submitted by Deleted_3747, , Thread ID: 18650

Thread Closed
Deleted_3747
0,004 IQ
Level:
19
Reputation:
216
Posts:
3.15K
Likes:
513
Credits:
150
24-02-2016, 03:47 PM
#1
So i was installing Mysubscriptions for MyBB & i was going to add a usergroup thingy...

But i got this error, in this code...

Can anyone see what's wrong with the line 414?

[Image: a24d8f88bb500a302f6d5d3772332069.png]

[Image: 45c9397bcb2871d88db2c80fb6931ecf.png]


Here is the code for the whole usergroup php lines

PHP Code:
// $query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
foreach($cache->cache['usergroups'] as $usergroup)
{
if(
intval($usergroup['gid']) != && !$usergroup['isbannedgroup'])
{
$usergroup_options[$usergroup['gid']] = $usergroup['title'];
}
}

if(isset(
$mybb->input['price_options']))
{
$forevs = array();
$others = array();
foreach(
$mybb->input['price_options'] as $_id => $opt)
{
if(empty(
$mybb->input['delete_price'][$_id]))
{
if(
intval($opt['l']) < 1$forevs[] = $opt;
else 
$others[] = $opt;
}
}
if(!empty(
$forevs))
{
$c = array();
foreach(
$forevs as $key => $val)
{
$c[$key] = $val['c'];
}
array_multisort($cSORT_ASC$forevs);
}
if(!empty(
$others))
{
$c $l $lt = array();
foreach(
$others as $key => $val)
{
$c[$key] = $val['c'];
$l[$key] = $val['l'];
$lt[$key] = $val['lt'];
}
array_multisort($ltSORT_ASC$lSORT_ASC$cSORT_ASC$others);
}
$mybb->input['price_options'] = array();
foreach(
$others as $a$mybb->input['price_options'][] = $a;
foreach(
$forevs as $a$mybb->input['price_options'][] = $a;
}

if(
$mybb->request_method == 'post')
{
if(!isset(
$mybb->input['add']))
{
$name $db->escape_string($mybb->input['name']);
if(empty(
$name) || rtrim($name) == ''$errors[] = $lang->error_empty_name;

$price $db->escape_string(serialize($mybb->input['price_options']));

$currency $db->escape_string($mybb->input['currency']);
if(!
in_array($currencyarray_keys($currency_options))) $errors[] = $lang->error_invalid_currency;

$new_group intval($mybb->input['new_group']);
if(!
in_array($new_grouparray_keys($usergroup_options))) $errors[] = $lang->error_invalid_group;

if(!empty(
$mybb->input['accepted_groups']))
{
foreach(
$mybb->input['accepted_groups'] as $group)
{
$gid intval($group['gid']);
if(
in_array($gidarray_keys($usergroup_options)))
{
$accepted[] = $gid;
}
}
}
$accepted = (empty($accepted) ? 'all' implode(','$accepted));

$item_name $db->escape_string($mybb->input['item_name']);
if(!
ctype_alnum($item_name) || count($item_name) > 127$errors[] = $lang->error_invalid_item_name

Users browsing this thread: 1 Guest(s)