Updated JSON Display class to use new constant.

This commit is contained in:
Josh Sherman 2010-03-24 18:47:10 -04:00
parent ccbfbe5981
commit 3fd46374b8

View file

@ -34,13 +34,13 @@ class Display_JSON extends Display_Common
*/
public function render()
{
if (!function_exists('json_encode'))
if (JSON_AVAILABLE)
{
echo '{ "type" : "error", "message" : "json_encode() not found" }';
echo json_encode($this->module_return);
}
else
{
echo json_encode($this->module_return);
echo '{ "status": "error", "message": "json_encode() not found" }';
}
}
}