PDO_API zend_class_entry *php_pdo_get_exception_base(int root TSRMLS_DC)
{
-#if can_handle_soft_dependency_on_SPL && defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
+#if defined(HAVE_SPL)
if (!root) {
if (!spl_ce_RuntimeException) {
zend_class_entry *pce;
}
}
#endif
-#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 2)
- return zend_exception_get_default();
-#else
return zend_exception_get_default(TSRMLS_C);
-#endif
}
zend_class_entry *pdo_dbh_ce, *pdo_dbstmt_ce, *pdo_row_ce;
}
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
#endif
-#if PHP_MAJOR_VERSION > 5 || PHP_MINOR_VERSION >= 1
if (!ce->unserialize) {
zval_ptr_dtor(&val);
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "cannot unserialize class" TSRMLS_CC);
} else {
zval_ptr_dtor(&val);
}
-#endif
}
break;
mode = stmt->default_fetch_type & ~PDO_FETCH_FLAGS;
}
-#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 1
- if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) {
- pdo_raise_impl_error(stmt->dbh, stmt, "IM001", "PDO::FETCH_SERIALIZE is not supported in this PHP version" TSRMLS_CC);
- return 0;
- }
-#endif
-
switch(mode) {
case PDO_FETCH_FUNC:
if (!fetch_all) {
#include "zend.h"
-#if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1)
-#define can_handle_soft_dependency_on_SPL 1
-#endif
-
extern zend_module_entry pdo_module_entry;
#define phpext_pdo_ptr &pdo_module_entry
/* let see if the path already exists */
if (php_stream_stat_path_ex(file_dirname_fullpath, PHP_STREAM_URL_STAT_QUIET, &ssb, NULL) < 0) {
-
-#if defined(PHP_WIN32) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 1)
- char *e;
- e = file_dirname_fullpath;
- while (*e) {
- if (*e == '/') {
- *e = DEFAULT_SLASH;
- }
- e++;
- }
-#endif
-
ret = php_stream_mkdir(file_dirname_fullpath, 0777, PHP_STREAM_MKDIR_RECURSIVE|REPORT_ERRORS, NULL);
if (!ret) {
efree(file_dirname_fullpath);
return 0;
}
-#if PHP_API_VERSION < 20100412
- stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
-#else
stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL);
-#endif
if (stream == NULL) {
n = -1;