Skip to content

Commit 8b6a2d5

Browse files
committed
Convert mysqli_sql_exception:: to typed property
1 parent 8667dc9 commit 8b6a2d5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ext/mysqli/mysqli.stub.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,7 @@ public function next(): bool {}
599599

600600
final class mysqli_sql_exception extends RuntimeException
601601
{
602-
/** @var string */
603-
protected $sqlstate = "00000";
602+
protected string $sqlstate = "00000";
604603
}
605604

606605
function mysqli_affected_rows(mysqli $mysql): int|string {}

ext/mysqli/mysqli_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 14c5c4960e70f5b38fc6c4f4403804cc28147b0b */
2+
* Stub hash: b0232d18f570208d673ad7535ca60997e038acb8 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
55
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
@@ -1356,7 +1356,7 @@ static zend_class_entry *register_class_mysqli_sql_exception(zend_class_entry *c
13561356
zend_string *property_sqlstate_default_value_str = zend_string_init("00000", sizeof("00000") - 1, 1);
13571357
ZVAL_STR(&property_sqlstate_default_value, property_sqlstate_default_value_str);
13581358
zend_string *property_sqlstate_name = zend_string_init("sqlstate", sizeof("sqlstate") - 1, 1);
1359-
zend_declare_property_ex(class_entry, property_sqlstate_name, &property_sqlstate_default_value, ZEND_ACC_PROTECTED, NULL);
1359+
zend_declare_typed_property(class_entry, property_sqlstate_name, &property_sqlstate_default_value, ZEND_ACC_PROTECTED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
13601360
zend_string_release(property_sqlstate_name);
13611361

13621362
return class_entry;

0 commit comments

Comments
 (0)