cvs: pear /Structures_DataGrid/DataGrid DataSource.php
| From: | Andrew Nagy | Date: | Mon, 16 May 2005 18:57:36 +0000 |
| Subject: | cvs: pear /Structures_DataGrid/DataGrid DataSource.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-31883@lists.php.net to get a copy of this message | ||
asnagy Mon May 16 14:57:36 2005 EDT
Modified files:
/pear/Structures_DataGrid/DataGrid DataSource.php
Log:
Return constructor errors from datasource drivers
http://cvs.php.net/diff.php/pear/Structures_DataGrid/DataGrid/DataSource.php?r1=1.4&r2=1.5&ty=u
Index: pear/Structures_DataGrid/DataGrid/DataSource.php
diff -u pear/Structures_DataGrid/DataGrid/DataSource.php:1.4
pear/Structures_DataGrid/DataGrid/DataSource.php:1.5
--- pear/Structures_DataGrid/DataGrid/DataSource.php:1.4 Wed Mar 30 10:45:37 2005
+++ pear/Structures_DataGrid/DataGrid/DataSource.php Mon May 16 14:57:36 2005
@@ -17,7 +17,7 @@
// | Andrew Nagy <asnagy@webitecture.org> |
// +----------------------------------------------------------------------+
//
-// $Id: DataSource.php,v 1.4 2005/03/30 15:45:37 asnagy Exp $
+// $Id: DataSource.php,v 1.5 2005/05/16 18:57:36 asnagy Exp $
// Data Source Drivers
@@ -176,9 +176,13 @@
$classname = "Structures_DataGrid_DataSource_$type";
$driver = new $classname();
- $driver->bind($source, $options);
+ $result = $driver->bind($source, $options);
- return $driver;
+ if (PEAR::isError($result)) {
+ return $result;
+ } else {
+ return $driver;
+ }
}