Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.1
-
Fix Version/s: 1.5.3
-
Component/s: Zend_Rest_Server
-
Labels:None
-
Fix Version Priority:Must Have
Description
A blank page appears if there's any missing method's argument when calling from a url (sent as HTTP GET variables)
This issue appears when application reaches this line:
throw new Zend_Rest_Server_Exception('Invalid Method Call to ' . $this->_method . '. Requires ' . count($func_args) . ', ' . count($calling_args) . ' given.', 400);
If I replace that line with:
throw new Exception("Fails in line 149");
A blank page appears again, but if I error message is echoed everything works just fine.
File Zend/REST/Server.php line 149
I thought it was caused because of a php fatal error, but I don't find that yet.
I've had this issue in two different hosts:
Solaris 10
Apache 2
PHP 5.2.1
CentOS
Apache 2
PHP 5.2.1
Here's my testing code:
service PHP
<?php
ini_set('error_reporting', E_ALL);
require_once 'Zend/Rest/Server.php';
require_once 'test.php';
$server = new Zend_Rest_Server();
$server->setClass('test');
$server->handle();
?>
Test.php
<?php
class test
{
/**
* Test Method
*
* @param string $to
* @param string $say
* @return bool
*/
public function sayHi($to, $say)
{
return "Good $say, $to";
}
}
?>
Assigning to
Davey Shafik to initiate issue review