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

Commit

Permalink
Merge branch 'hotfix/zendframework/zendframework#6785-remove-version-…
Browse files Browse the repository at this point in the history
…checks-for-incompatible-versions' into develop

Close zendframework/zendframework#6785
Forward port zendframework/zendframework#6785
  • Loading branch information
Ocramius committed Nov 27, 2014
2 parents 386f278 + 78a98d0 commit 8c4d475
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ public function getResponse()
*/
public function setResponseClass($class)
{
if (!class_exists($class) || !static::isSubclassOf($class, 'Zend\XmlRpc\Response')) {
if (!class_exists($class) || !is_subclass_of($class, 'Zend\XmlRpc\Response')) {
throw new Server\Exception\InvalidArgumentException('Invalid response class');
}
$this->responseClass = $class;
Expand Down Expand Up @@ -588,22 +588,14 @@ protected function registerSystemMethods()
* @see https://bugs.php.net/bug.php?id=53727
* @see https://github.com/zendframework/zf2/pull/1807
*
* @deprecated since zf 2.3 requires PHP >= 5.3.23
*
* @param string $className
* @param string $type
* @return bool
*/
protected static function isSubclassOf($className, $type)
{
if (is_subclass_of($className, $type)) {
return true;
}
if (PHP_VERSION_ID >= 50307) {
return false;
}
if (!interface_exists($type)) {
return false;
}
$r = new ReflectionClass($className);
return $r->implementsInterface($type);
return is_subclass_of($className, $type);
}
}

0 comments on commit 8c4d475

Please sign in to comment.