Bienvenue sur Geeklog France, anonyme 21 novembre 2017 - 11:07

Ticket No 2
Ivy

21 avril 2014 - 23:56 - Ivy

PHP 5.4 Illegal string offset

E_WARNING(2) - Illegal string offset 'name' @ /admin/plugins/paypalproduct_edit.php line 210

Ben

22 avril 2014 - 00:11 - Ben - Note #1

I need to change my code to check if variables are set to avoid warning message. You can try to disable warning message in your php.ini (error_reporting config) or add error_reporting(0); in the /admin/plugins/paypalproduct_edit.php page

Sometimes it might be also helpful to add some utility functions to our codebase, to shorten this repetitive task. For example

function isset_get($array, $key, $default = null) {
return isset($array[$key]) ? $array[$key] : $default;
}

Then we can go with

$myVar = isset_get($someArray, 'someKey');
//or with some default if we got one
$myVar = isset_get($someArray, 'someKey', $mydefault);

Ben

23 avril 2014 - 10:29 - Ben - Note #2

List of the new files to avoid error message :

- public_html/admin/plugin/paypal/index.php
- public_html/admin/plugin/paypal/subscriptions.php
- public_html/admin/plugin/paypal/product_edit.php
- plugin/paypal/functions.inc
- plugin/paypal/proversion/proversion.php

A new release of the paypal plugin will be available soon.

Thanks for your report Ivy.

Ce ticket est fermé.

Historique

Ivy le 21 avril 2014 - 23:56 a ouvert le ticket
Ben le 24 avril 2014 - 12:28 a fermé le ticket