This topic is locked
[SOLVED]

 Illegal string offset / PHP 5.5.6

2/14/2014 6:29:56 AM
PHPRunner General questions
T
taumic author

Hello,
I have switched from PHP 5.2.6 to PHP 5.5.6.

Now I get the following error when I try to modify (or view) a record:
====================

Fehlertyp 2

Fehlerbeschreibung Illegal string offset 'RGP_ARTIKEL_NR'

URL localhost/alaska_71/rg_pos_list.php?

Fehlerdatei D:\xampp\htdocs\Alaska_71\include\phpfunctions.php

Fehlerzeile 716

SQL Abfrage SELECT Artikel_nr, Gruppe, Untergruppe, Reise_nr, Beschreibung, Description, Preisgruppe, Preis_EUR, Preis_Fremdw, EUR_Faktor, Einheit, Unit, if(EUR_Faktor IS NULL or EUR_FAKTOR = 0,0,(1/EUR_Faktor)) as ReFaktor, Detail_dt, Detail_en, concat( Left(Beschreibung,50), ' - Art.Nr: ', Artikel_nr, ' - Preis: ', Preis_EUR) FROM artikel WHERE Artikel_nr = 7 ORDER BY Gruppe,Beschreibung,Preis_EUR

====================
I use Windows 7 / XAMPP 1.8.3 (PHP 5.5.6 - MySQL 5.6.14)/ PHPrunner 7.1 build 20499 x86

Do I need to change something?
Thanks in advanced.
Michael

Sergey Kornilov admin 2/14/2014

I would ask you to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

A
Anapolis 2/16/2014

[size="3"]The change in how PHP responded began in version 5.4.
Your message says that PHP was expecting an array with a key and then a value such as Example:
($key => $value) or
($key0 => $value, $key1 => $value, $key2 => $value )
but what PHP is getting is a String value such as (2193) or maybe a NULL?
Sergey will help you get this straightened out.
But I am guessing that perhaps you have created a Custom Where Expressionin the lookup for your table or Custom View and that 'RGP_ARTIKEL_NR' is involved.
It is not specified in your QUERY but there it is: 'RGP_ARTIKEL_NR' -- a table field, perhaps a primary ID, popping up as an error about where Custom Expressions and Lookup Wizard specifications are called for in the phpfunctions.php file.
I would look through your [size="4"][color="#2F4F4F"]rg_pos list, edit, and Add [/size] pages carefully, particularly examine to see if you have applied a Custom Where Expression through the Lookup Wizard to the page Lookup.
Perhaps you have a stray Custom Where Expression that calls for 'RGP_ARTIKEL_NR' in the ADD & EDIT and VIEW pages that is not applied to your List page.

[/size]

T
taumic author 2/17/2014

Hello Maverick,
you brought me on the right path:

On "EDIT PAGE" in tab "VIEW AS" I had my mistake in "CUSTOM":
==> $value["RGP_ARTIKEL_NR"] <== wrong!!!
after I change it to
==> $value=$data["RGP_ARTIKEL_NR"] <== correctly!!!
everything went like clockwork.
Many thanks, also to Sergey
Michael