Active
Project:
Form Multicrud
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2011 at 20:47 UTC
Updated:
23 Jun 2011 at 20:52 UTC
When running PHP version < 5.2 (I'm on 5.1.x) the code throws a PHP error on line 106 for calling json_encode, which is only present in PHP 5.2 and greater. While 5.2 is a requirement for D7, it is not for D6 (though it is recommended).
The error can be eradicated by replacing the call to json_encode with a call to drupal_to_js, which seems to work fine, but I haven't done any significant testing. (The equivalent D7 function is drupal_json_encode.)
Comments
Comment #1
donquixote commentedHi,
Or I simply change the requirement to PHP 5.2
I understand why D6 core can not suddenly change its requirement to PHP 5.2, but I don't think new modules have to support legacy PHP.
Do you think PHP 5.1 is still wide-spread? And, can you think of reasons why someone would not upgrade to 5.2?
For 5.3 this is very understandable, because it does break a lot of things. But I don't see any reason not to upgrade from 5.1 to 5.2.
If you can convince me (with a link to some stats) that 5.1 is still worth supporting, I will change the json_encode() to drupal_to_js().