Skip to content

Commit

Permalink
Merge pull request #170 from rippiedoos/master
Browse files Browse the repository at this point in the history
fix constructors in json.php
  • Loading branch information
lingej authored May 30, 2020
2 parents 7832903 + 00c12a6 commit 674ff6c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions share/pnp/application/lib/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class Services_JSON
* bubble up with an error, so all return values
* from encode() should be checked with isError()
*/
function Services_JSON($use = 0)
function __construct($use = 0)
{
$this->use = $use;
}
Expand Down Expand Up @@ -666,7 +666,7 @@ function decode($str)
// element in an associative array,
// for now
$parts = array();

if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
// "name":value pair
$key = $this->decode($parts[1]);
Expand Down Expand Up @@ -780,7 +780,7 @@ function isError($data, $code = null)

class Services_JSON_Error extends PEAR_Error
{
function Services_JSON_Error($message = 'unknown error', $code = null,
function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
Expand All @@ -794,13 +794,13 @@ function Services_JSON_Error($message = 'unknown error', $code = null,
*/
class Services_JSON_Error
{
function Services_JSON_Error($message = 'unknown error', $code = null,
function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{

}
}

}

?>

0 comments on commit 674ff6c

Please sign in to comment.