mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
General: Continuing to work towards a passing PHP Compatibility scan.
This is a final pass to fix PHP compatibiilty issues in the codebase with code changes or adding `phpcs:ignore` comments. With this change, all PHP compatibility warnings and errors without specific tickets have been addressed (see #49810 and #41750). Props desrosj, johnbillion, jrf. See #49922. git-svn-id: https://develop.svn.wordpress.org/trunk@47902 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -187,7 +187,8 @@ class Requests {
|
||||
|
||||
// Don't search for a transport if it's already been done for these $capabilities
|
||||
if (isset(self::$transport[$cap_string]) && self::$transport[$cap_string] !== null) {
|
||||
return new self::$transport[$cap_string]();
|
||||
$class = self::$transport[$cap_string];
|
||||
return new $class();
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
@@ -214,7 +215,8 @@ class Requests {
|
||||
throw new Requests_Exception('No working transports found', 'notransport', self::$transports);
|
||||
}
|
||||
|
||||
return new self::$transport[$cap_string]();
|
||||
$class = self::$transport[$cap_string];
|
||||
return new $class();
|
||||
}
|
||||
|
||||
/**#@+
|
||||
|
||||
Reference in New Issue
Block a user