summaryrefslogtreecommitdiff
path: root/ext/pdo/php_pdo.h
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-09-20 19:52:24 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-09-20 19:52:24 +0000
commit4dff36f6b48bacdeb63a2abec3c1c106e69b1599 (patch)
treea750c9b288340254e322b456e22e788082831701 /ext/pdo/php_pdo.h
parentbcb70109d2e2c6c8badb7c8320221a0316296226 (diff)
downloadphp-git-4dff36f6b48bacdeb63a2abec3c1c106e69b1599.tar.gz
MFH: Allow overloading of PDO constructor.
Diffstat (limited to 'ext/pdo/php_pdo.h')
-rwxr-xr-xext/pdo/php_pdo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h
index ba63cbfb97..c4b9c94c68 100755
--- a/ext/pdo/php_pdo.h
+++ b/ext/pdo/php_pdo.h
@@ -70,6 +70,13 @@ ZEND_END_MODULE_GLOBALS(pdo)
#define REGISTER_PDO_CLASS_CONST_STRING(const_name, value) \
zend_declare_class_constant_stringl(pdo_dbh_ce, const_name, sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC);
+#define PDO_CONSTRUCT_CHECK \
+ if (!dbh->driver) { \
+ pdo_raise_impl_error(dbh, NULL, "00000", "PDO constructor was not called" TSRMLS_CC); \
+ return; \
+ } \
+
+
#endif /* PHP_PDO_H */