-1

On a newly installed server running CakePHP 3.2.14, a call to debug($myEntity) displays the following error after displaying the entity without any visible problem:

An Internal Error Has Occurred

Error: Error executing command: Unable to parse JSON data: JSON_ERROR_SYNTAX - Syntax error, malformed JSON

Any idea?

EDIT According to my tests, I get this error runing PHP7.0. I don't have this error running PHP5.6.

What does it mean?

fralbo
  • 2,534
  • 4
  • 41
  • 73
  • 1
    Care to tell what `$myEntity` consists of? – learner Oct 22 '16 at 14:26
  • @learner, you are right even if the name is quite self explainable, $myentity is an entity object. It's not the first `debug()` I call in my code but I don't understand why this one fails. I've added what it displays. – fralbo Oct 22 '16 at 15:22
  • What happens if *you* `json_encode` `$myEntity` on PHP7 vs PHP5.x? This'll help work out whether the problem is with PHP7 or CakePHP. – Adam Cameron Oct 22 '16 at 18:00
  • Whenever receiving errors, please always post **the _complete_ error message**, that is, **including the _full_ stacktrace** (ideally copied from the logs where it is available in a properly readable fashion), even if the problem might be obvious to people who are familiar with CakePHP! – ndm Oct 22 '16 at 18:14

1 Answers1

0

Sorry guys, after deeper searchs I found that te problem comes from a plugin.

fralbo
  • 2,534
  • 4
  • 41
  • 73