Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Commit

Permalink
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

namespace Zend\XmlRpc;

use ReflectionClass;
use Zend\Server\AbstractServer;
use Zend\Server\Definition;
use Zend\Server\Reflection;
use Zend\Stdlib\SubClass;

/**
* An XML-RPC server implementation
Expand Down Expand Up @@ -439,10 +439,9 @@ public function getResponse()
*/
public function setResponseClass($class)
{
if (!class_exists($class) or
($c = new ReflectionClass($class) and !$c->isSubclassOf('Zend\\XmlRpc\\Response'))) {

if (!class_exists($class) || !SubClass::isSubclassOf($class, 'Zend\XmlRpc\Response')) {
throw new Server\Exception\InvalidArgumentException('Invalid response class');

}
$this->responseClass = $class;
return true;
Expand Down

0 comments on commit d37df59

Please sign in to comment.