Skip to content

Commit c1b48d0

Browse files
committed
Use hasThis() where appropriate
This macro was introduced to solve false compilers warning about the getThis() condition not making sense for the address-taken part of the ternary.
1 parent 22e444c commit c1b48d0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ext/intl/formatter/formatter_format.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ PHP_FUNCTION( numfmt_format )
104104
INTL_METHOD_CHECK_STATUS( nfo, "Number formatting failed" );
105105
break;
106106
case FORMAT_TYPE_CURRENCY:
107-
if (getThis()) {
107+
if (hasThis()) {
108108
const char *space;
109109
const char *class_name = get_active_class_name(&space);
110110
zend_argument_value_error(2, "cannot be NumberFormatter::TYPE_CURRENCY constant, "

ext/intl/formatter/formatter_parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ PHP_FUNCTION( numfmt_parse )
8686
RETVAL_DOUBLE(val_double);
8787
break;
8888
case FORMAT_TYPE_CURRENCY:
89-
if (getThis()) {
89+
if (hasThis()) {
9090
const char *space;
9191
const char *class_name = get_active_class_name(&space);
9292
zend_argument_value_error(2, "cannot be NumberFormatter::TYPE_CURRENCY constant, "

ext/mysqli/mysqli_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ PHP_FUNCTION(mysqli_data_seek)
327327
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
328328

329329
if (mysqli_result_is_unbuffered(result)) {
330-
if (getThis()) {
330+
if (hasThis()) {
331331
zend_throw_error(NULL, "mysqli_result::data_seek() cannot be used in MYSQLI_USE_RESULT mode");
332332
} else {
333333
zend_throw_error(NULL, "mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode");
@@ -855,7 +855,7 @@ PHP_FUNCTION(mysqli_free_result)
855855
/* {{{ Get MySQL client info */
856856
PHP_FUNCTION(mysqli_get_client_info)
857857
{
858-
if (getThis()) {
858+
if (hasThis()) {
859859
if (zend_parse_parameters_none() == FAILURE) {
860860
RETURN_THROWS();
861861
}

0 commit comments

Comments
 (0)