PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1

cleanup and PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1
This commit is contained in:
Popa Marius Adrian 2014-04-28 14:27:35 +03:00 committed by Julien Pauli
parent bb422cb60e
commit cf2cd8fb20

View File

@ -1141,7 +1141,6 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
}
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);
@ -1155,7 +1154,6 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
} else {
zval_ptr_dtor(&val);
}
#endif
}
break;
@ -1256,13 +1254,6 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, long mode, int fetch_all TSRML
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) {