Skip to content

Commit

Permalink
check that Services_JSON is not already defined by an external program
Browse files Browse the repository at this point in the history
git-svn-id: https://phpfreechat.svn.sourceforge.net/svnroot/phpfreechat/trunk@994 2772adf2-ac07-0410-9d30-e29d8120292e
  • Loading branch information
kerphi committed Mar 10, 2007
1 parent 9d1f071 commit 08c8311
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pfcjson.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function pfcJSON()
{
// if the php5-json module is not available, use a software json implementation
if (!function_exists('json_encode')) {
require_once(dirname(__FILE__)."/../lib/json/JSON.php");
if (!class_exists('Services_JSON'))
require_once(dirname(__FILE__)."/../lib/json/JSON.php");
$this->json = new Services_JSON();
}
}
Expand Down

0 comments on commit 08c8311

Please sign in to comment.