Skip to content

Commit f11411e

Browse files
committed
Use typed property in PDOException
1 parent a92f5cb commit f11411e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ext/pdo/pdo.stub.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
class PDOException extends RuntimeException
66
{
7-
/** @var array|null */
8-
public $errorInfo;
7+
public ?array $errorInfo = null;
98
}
109

1110
function pdo_drivers(): array {}

ext/pdo/pdo_arginfo.h

+2-2
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: e5e41e3d0ae7a506b43996b6071047755a39d61a */
2+
* Stub hash: 5cb75e0f0869651dd616b11c3bd0d407deb3c6df */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pdo_drivers, 0, 0, IS_ARRAY, 0)
55
ZEND_END_ARG_INFO()
@@ -28,7 +28,7 @@ static zend_class_entry *register_class_PDOException(zend_class_entry *class_ent
2828
zval property_errorInfo_default_value;
2929
ZVAL_NULL(&property_errorInfo_default_value);
3030
zend_string *property_errorInfo_name = zend_string_init("errorInfo", sizeof("errorInfo") - 1, 1);
31-
zend_declare_property_ex(class_entry, property_errorInfo_name, &property_errorInfo_default_value, ZEND_ACC_PUBLIC, NULL);
31+
zend_declare_typed_property(class_entry, property_errorInfo_name, &property_errorInfo_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ARRAY|MAY_BE_NULL));
3232
zend_string_release(property_errorInfo_name);
3333

3434
return class_entry;

0 commit comments

Comments
 (0)