1

We´re facing a big problem in our company but let me explain...

In Php 5.6 we expanded our array like the example below

if($_SESSION[$id]['UH'][$_SESSION[$id]['X']['CONTROL']['syuni']]['fixed_values'][$_header_key] != '')
    $_SESSION[$id]['X']['FILTER']['FLD'][$_header_key] = $_SESSION[$id]['UH'][$_SESSION[$id]['X']['CONTROL']['syuni']]['fixed_values'][$_header_key];

In Php 7.x our expanded array will not work well. We only get

($_SESSION[$id]['UH'][$_SESSION[$id]['X']['CONTROL']['syuni']]['fixed_values'][$_header_key] != '') $_SESSION[$id]['X']['FILTER']['FLD'][$_header_key]

to work.

_SESSION[$id]['UH'][$_SESSION[$id]['X']['CONTROL']['syuni']]['fixed_values'][$_header_key]

isn´t working as an Expansion of our first Array. Could someone explain me, why and how the Array-handling changed?

Philipp Maurer
  • 2,480
  • 6
  • 18
  • 25
Yogg Saron
  • 11
  • 1
  • "isn't working" means what? An error, or warning? Or unexpected result? Please show the input data, the result you expected, and the result you're actually getting. – ADyson Apr 30 '20 at 10:28
  • 1
    While your PHP-5.6 code looks good, you tried to split the PHP-7 code into two parts. Those two parts are not vaild code though, which makes it hard to locate the problem. Could you therefore please provide the following information: A complete code-example of your PHP-7 code of that part. (Or if it is the same, please state that.) Did you debug your `$_SESSION` variable and verify, that the data that are stored there are still the same? If you did, please provide an example of that. Remember to change all security relevant parts of it, before you post it on StackOverflow :-) – Philipp Maurer Apr 30 '20 at 10:35
  • Well, we never changed the code so far. We tried to use the same code from PHP 5.6 in 7.x. We still have some warnings in our log, but nothing dramatic or breakable. In general, our Output should give us results in a table. in PHP 5.6 we see our table, filled with information that we get from our database, everything fine and smooth. Filter is working properly - As we switched to PHP 7, our table is empty and no results are shown. We debugged everything to the ground and noticed, that our array handling is kinda broken. Blank tables everywhere, no matter what we search. – Yogg Saron Apr 30 '20 at 10:57
  • I will provide more Code later on! – Yogg Saron Apr 30 '20 at 10:58

0 Answers0