svn: /pear/packages/HTTP_Request2/trunk/HTTP/ Request2.php
| From: | Alexey Borzov | Date: | Wed, 04 Apr 2012 12:40:25 +0000 |
| Subject: | svn: /pear/packages/HTTP_Request2/trunk/HTTP/ Request2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-64607@lists.php.net to get a copy of this message | ||
avb Wed, 04 Apr 2012 12:40:25 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=324795
Log:
Additional class_exists() check in setAdapter() (request #19344)
Bug: http://pear.php.net/bugs/19344 (unknown)
Changed paths:
U pear/packages/HTTP_Request2/trunk/HTTP/Request2.php
Modified: pear/packages/HTTP_Request2/trunk/HTTP/Request2.php
===================================================================
--- pear/packages/HTTP_Request2/trunk/HTTP/Request2.php 2012-04-04 10:08:01 UTC (rev 324794)
+++ pear/packages/HTTP_Request2/trunk/HTTP/Request2.php 2012-04-04 12:40:25 UTC (rev 324795)
@@ -837,7 +837,9 @@
if (false === strpos($adapter, '_')) {
$adapter = 'HTTP_Request2_Adapter_' . ucfirst($adapter);
}
- if (preg_match('/^HTTP_Request2_Adapter_([a-zA-Z0-9]+)$/', $adapter)) {
+ if (!class_exists($adapter, false)
+ && preg_match('/^HTTP_Request2_Adapter_([a-zA-Z0-9]+)$/',
$adapter)
+ ) {
include_once str_replace('_', DIRECTORY_SEPARATOR, $adapter) .
'.php';
}
if (!class_exists($adapter, false)) {