Author Topic: upg php 5.6.38 to php 7.2: show cart #0 [] operator not supported for strings  (Read 850 times)

jdraper

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 9
virtuemart 3.4.2
php 5.6.38
joomla 3.9.1

Changed to PHP 7.2

show cart gives me:

#0 [] operator not supported for strings


GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8892
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
You need to find where it is by debug and logging and declare the far as an array
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jdraper

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 9
I found the likely issue here:

Call stack      
#   Function   Location
1   ()   JROOT/plugins/vmpayment/elavon/elavon.php:251

Of course this is my elavon payment method.

I look at line 251 and it is nothing.

What am I looking for when you say "declare the far as an array"?

Jerry

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2179
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
I think he means the var
Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8892
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
yes -- var -- touchscreens..  ::)

look for something like

$foo = $bah[];

then look at the code above and see if the $bah has been declared as an array

if not before it put $bah = array();
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jdraper

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 9
at stmt 251 I have:

            $htmla[] = $html;

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2179
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
$htmla = array();
Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8892
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Before that line
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2179
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Code: [Select]
$htmla = array();
$htmla[] = $html;

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

jdraper

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 9
Thanks,  that resolved my issue.  I am now on pHp 7.2.

Yeah!

Jerry