Recently I upgraded php to version 5.5. Within this upgrade module for json was moved out from php5 package into a new package php5-json. So I installed it.
Now the connection with firephp (and firebug).
Before sending, firephp::log encodes the variable with json_encode.
There might occur an issue with json_encode. The json_encode may fail to encode the input variable. This might happen in a string with unencoded unicode or a string with some ill encoded characters.
Behaviour in previous version of php
- In firebug instead of the value with the wrong coding white space appears.
- After the wrong value firebug continues to display next values which arrived from firephp.
Behaviour with separate php5-json
- When the ill encoded value arrives to firebug, following error message appears:
SyntaxError: JSON.parse: unexpected character
- After this listing logs from firephp stops.
I understand that there was an 'unexpected character'. But I'd just like to move on and see the following messages. Not stop on the first unexpected character.
What shall I do to solve the issue? Or at least get back to the previous bevior?
- Debian testing jessie
- Linux host 3.10-2-amd64 #1 SMP Debian 3.10.5-1 (2013-08-07) x86_64 GNU/Linux
- php5 5.5.1+dfsg-2
- php5-json 1.3.1+dfsg-1
- iceweasel 22.0
- Firebug 1.11.4
- Firephp 0.7.2
I also can see in Firebug header X-Wf-1-1-1-2:
Which does miss the value part and thus is not valid JSON, which is why the rendering fails.
The header with the correct message, which gets printed:
I submitted this as a bug in Debian 719942. But it doesn't seem that someone is willing to have a look at it :-(