Commit 039dec51 authored by Mike Hibler's avatar Mike Hibler
Browse files

Fix a long-time problem revealed by PHP5.

A test of $decoded->{"code"} should have been $decoded{"code"}.
You do NOT want to know how long it took me to figure this out!
parent 9577ec16
<?php <?php
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group. # Copyright (c) 2010 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
# This is an included file. No headers or footers. # This is an included file. No headers or footers.
...@@ -131,7 +131,7 @@ function XMLRPC($uid, $gid, $method, $arghash) ...@@ -131,7 +131,7 @@ function XMLRPC($uid, $gid, $method, $arghash)
$return_value = proc_close($process); $return_value = proc_close($process);
if ($return_value || $output == "" || if ($return_value || $output == "" ||
(($decoded = ParseResponse($output)) == NULL) || $decoded->{"code"}) { (($decoded = ParseResponse($output)) == NULL) || $decoded{"code"}) {
TBERROR("XMLRPC backend failure!\n". TBERROR("XMLRPC backend failure!\n".
"$uid $gid $method returned $return_value\n". "$uid $gid $method returned $return_value\n".
"Arg Hash:\n" . "Arg Hash:\n" .
...@@ -144,4 +144,4 @@ function XMLRPC($uid, $gid, $method, $arghash) ...@@ -144,4 +144,4 @@ function XMLRPC($uid, $gid, $method, $arghash)
# TBERROR(print_r($decoded, true), 0); # TBERROR(print_r($decoded, true), 0);
return $decoded{'value'}; return $decoded{'value'};
} }
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment