summaryrefslogtreecommitdiff
path: root/ext/pdo_oci/oci_driver.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-06-06 01:47:22 +0300
committerDmitry Stogov <dmitry@zend.com>2019-06-06 01:47:22 +0300
commit457392fa64692be0927ed641369370f02afb0420 (patch)
treee83d85fadb66cffa22fc119d3df60e72f2f9a007 /ext/pdo_oci/oci_driver.c
parent90a2e4ba668e89e59301abfe71175b0c0d1f9b96 (diff)
downloadphp-git-457392fa64692be0927ed641369370f02afb0420.tar.gz
Cheaper checks for exceptions thrown from __toString()
Diffstat (limited to 'ext/pdo_oci/oci_driver.c')
-rw-r--r--ext/pdo_oci/oci_driver.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c
index f121b4791b..eb1f70bdb0 100644
--- a/ext/pdo_oci/oci_driver.c
+++ b/ext/pdo_oci/oci_driver.c
@@ -460,8 +460,8 @@ static int oci_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) /
case PDO_OCI_ATTR_ACTION:
{
#if (OCI_MAJOR_VERSION >= 10)
- zend_string *action = zval_get_string(val);
- if (EG(exception)) {
+ zend_string *action = zval_try_get_string(val);
+ if (UNEXPECTED(!action)) {
return 0;
}
@@ -481,8 +481,8 @@ static int oci_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) /
case PDO_OCI_ATTR_CLIENT_INFO:
{
#if (OCI_MAJOR_VERSION >= 10)
- zend_string *client_info = zval_get_string(val);
- if (EG(exception)) {
+ zend_string *client_info = zval_try_get_string(val);
+ if (UNEXPECTED(!client_info)) {
return 0;
}
@@ -502,8 +502,8 @@ static int oci_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) /
case PDO_OCI_ATTR_CLIENT_IDENTIFIER:
{
#if (OCI_MAJOR_VERSION >= 10)
- zend_string *identifier = zval_get_string(val);
- if (EG(exception)) {
+ zend_string *identifier = zval_try_get_string(val);
+ if (UNEXPECTED(!identifier)) {
return 0;
}
@@ -523,8 +523,8 @@ static int oci_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) /
case PDO_OCI_ATTR_MODULE:
{
#if (OCI_MAJOR_VERSION >= 10)
- zend_string *module = zval_get_string(val);
- if (EG(exception)) {
+ zend_string *module = zval_try_get_string(val);
+ if (UNEXPECTED(!module)) {
return 0;
}