From 58fa098cab50cc0a9344d02772749177285929e5 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 12 Jan 2021 01:49:38 +0000 Subject: [PATCH] Fixed parameter type of Phar::setStub() The docs say string only, but after examining the code it's apparent that both resource _and_ string are accepted. --- ext/phar/phar_object.stub.php | 2 +- ext/phar/phar_object_arginfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/phar/phar_object.stub.php b/ext/phar/phar_object.stub.php index f51b3b0368b3e..f90a115e6b175 100644 --- a/ext/phar/phar_object.stub.php +++ b/ext/phar/phar_object.stub.php @@ -134,7 +134,7 @@ public function setMetadata(mixed $metadata) {} public function setSignatureAlgorithm(int $algo, ?string $privateKey = null) {} /** - * @param resource $stub + * @param resource|string $stub * @return bool */ public function setStub($stub, int $length = -1) {} diff --git a/ext/phar/phar_object_arginfo.h b/ext/phar/phar_object_arginfo.h index 0998eec27a5ec..c2192aca9a12c 100644 --- a/ext/phar/phar_object_arginfo.h +++ b/ext/phar/phar_object_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e06a2ea3d97778e61aca0f91fda7b72c29ef171d */ + * Stub hash: fb477cdb092f6bbdd3e70cfb21c72654b4d63654 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)