WARNING: array_shift(): The argument should be an

12 years 10 months ago #168276 by sentix
Something to worry about (about 18 errors/warnings of that kind in one day ...)

Versions: CB 2.7.2, J 3.10.6

Please Log in to join the conversation.

12 years 10 months ago #168281 by nant
Sorry, i don't understand the issue.

Perhaps you can share more information?

Versions?
Exact steps to reproduce?
Exact messages?

Please Log in to join the conversation.

12 years 10 months ago #168283 by sentix
In my error log of CB Subs 1.2 I find these error messages ...

Why they occur, I don't know. Here you find a copy of one:

Error log
Event time: 30.06.2011 11:15:12
Message: WARNING: array_shift(): The argument should be an array in C:\inetpub\testdrive\components\com_comprofiler\plugin\user\plug_cbpaidsubscriptions\plugin\cbsubspromotion\cbsubs.promotion.php on line 731
Trace:
called in function array_shift(NULL) on line 731 in file
called in class cbpaidpromotionTotalizertype::getAmountBeforePercents() on line 277 in file
called in class cbpaidCrossTotalizer::computeAllTaxes() on line 156 in file
called in class cbpaidPaymentTotalizerCompoundable::computeTotalizer() on line 1489 in file
called in class cbpaidPaymentBasket::_computeTotalizers() on line 1380 in file
called in class cbpaidPaymentBasket::_storeBasketItemsTotalizers() on line 1353 in file
called in class cbpaidPaymentBasket::_tryCreateAndFillCreteSubscriptionsItems() on line 1248 in file
called in class cbpaidPaymentBasket::createAndFillCreteSubscriptionsItems() on line 2143 in file
called in class getcbpaidsubscriptionsTab::_createSubscriptionsAndPayment() on line 3648 in file
called in class getcbpaidsubscriptionsTab::getTabComponent() on line 4235 in file
called in class CBplug_cbpaidsubscriptions::getCBpluginComponent(471.48, 471.48, 1, true, "EUR")
called in function call_user_func_array(object(cbpaidPaymentBasket), array(0 => object(cbpaidPaymentTotalizer_subtotal1), 1 => object(cbpaidPaymentTotalizer_promotion), 2 => object(cbpaidPaymentTotalizer_salestax), 3 => object(cbpaidPaymentTotalizer_grandtotal)), "promotion") on line 582 in file
called in class cbPluginHandler::call(object(cbpaidPaymentBasket), array(19 => object(cbpaidPaymentItem)), array(0 => object(cbpaidPaymentTotalizer_subtotal1), 1 => object(cbpaidPaymentTotalizer_promotion), 2 => object(cbpaidPaymentTotalizer_salestax), 3 => object(cbpaidPaymentTotalizer_grandtotal))) on line 4112 in file
called in class cbTabs::_callTabPlugin() on line 4199 in file
called in class cbTabs::tabClassPluginTabs(false, 1309421712) on line 757 in file
called in function tabClass(object(moscomprofilerUser), array(19 => object(cbpaidSubscription)), "Upgrade", "U", 1309421712, false) on line 269 in file
called in function require_once("C:\inetpub\testdrive\components\com_comprofiler\comprofiler.php") on line 162 in file
called in class JComponentHelper::renderComponent(object(moscomprofilerUser), array(19 => object(cbpaidSubscription)), "Upgrade", "U", 1309421712) on line 124 in file
called in class JSite::dispatch(object(moscomprofilerUser), array(19 => object(cbpaidProductusersubscription)), array("cbpplanE" => array(0 => array("selected" => array(0 => "19"))), "cbpsubscriptionid" => array(19 => "2,99"), "cbpcbregUpgrade" => "Upgrade", "user" => "65", "cbpact" => "upgrade", "cbsecuritym3" => "cbm_38913c3c_77c8919e_5dfb8ff2f48f24e493bb611d6e7344da"), array(19 => array(0 => 2, 1 => 99)), NULL, "R", "Upgrade", "U") on line 68 in file
$_GET = array (
'option' => 'com_comprofiler',
'task' => 'pluginclass',
'user' => '65',
'plugin' => 'cbpaidsubscriptions',
'lang' => 'de',
'Itemid' => NULL,
)
$_POST = array (
'cbpplanE' =>
array (
0 =>
array (
'selected' =>
array (
0 => '19',
),
),
),
'cbpsubscriptionid' =>
array (
19 => '2,99',
),
'cbpcbregUpgrade' => 'Upgrade',
'user' => '65',
'cbpact' => 'upgrade',
'cbsecuritym3' => 'cbm_38913c3c_77c8919e_5dfb8ff2f48f24e493bb611d6e7344da',
)

Table affected: -
Table Key:
Change:
Change:
Username: XXX
Full name: XXXXXXXX
User Id: XX
IP Address: xx.243.228.93
Log Priority: Warning
Log Id: 2071

Versions: CB 2.7.2, J 3.10.6

Please Log in to join the conversation.

12 years 10 months ago - 12 years 10 months ago #168287 by beat
Thanks for reporting the warning error-log.

This warning is due to the fact that the amount / discount is set to be taken from a CB field, but that CB field is empty.

Nothing to worry about, as it will still operate correctly defaulting the amount to 0.0.

We will remove that warning in the next release.

#2610

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.372 seconds

Facebook Twitter LinkedIn