From 8dd76ded86e931015dba3050b286bd57382f405c Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Mon, 21 Nov 2022 23:27:18 +0100 Subject: [PATCH 1/3] Fix dictionary for strip_tags - allow null - allow array from PHP 7.4 (see https://www.php.net/manual/en/function.strip-tags.php) https://3v4l.org/VjbXO https://3v4l.org/VWsPr --- dictionaries/CallMap.php | 2 +- dictionaries/CallMap_74_delta.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index d58a32cf21c..1c1985bcb02 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -13907,7 +13907,7 @@ 'streamWrapper::unlink' => ['bool', 'path'=>'string'], 'streamWrapper::url_stat' => ['array', 'path'=>'string', 'flags'=>'int'], 'strftime' => ['string|false', 'format'=>'string', 'timestamp='=>'?int'], -'strip_tags' => ['string', 'string'=>'string', 'allowed_tags='=>'string'], +'strip_tags' => ['string', 'string'=>'string', 'allowed_tags='=>'?string'], 'stripcslashes' => ['string', 'string'=>'string'], 'stripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'], 'stripslashes' => ['string', 'string'=>'string'], diff --git a/dictionaries/CallMap_74_delta.php b/dictionaries/CallMap_74_delta.php index 6226077179f..91120d0a522 100644 --- a/dictionaries/CallMap_74_delta.php +++ b/dictionaries/CallMap_74_delta.php @@ -45,6 +45,10 @@ 'old' => ['resource|false', 'command'=>'string', 'descriptor_spec'=>'array', '&pipes'=>'resource[]', 'cwd='=>'?string', 'env_vars='=>'?array', 'options='=>'?array'], 'new' => ['resource|false', 'command'=>'string|array', 'descriptor_spec'=>'array', '&pipes'=>'resource[]', 'cwd='=>'?string', 'env_vars='=>'?array', 'options='=>'?array'], ], + 'strip_tags' => [ + 'old' => ['string', 'string'=>'string', 'allowed_tags='=>'?string'], + 'new' => ['string', 'string'=>'string', 'allowed_tags='=>'string|null|list'], + ], ], 'removed' => [ ], From d33c338072112a93e765feb79503080e90aff928 Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Tue, 22 Nov 2022 12:27:50 +0100 Subject: [PATCH 2/3] strip_tags: allow nullable `allowed_tags` arguments from PHP80 --- dictionaries/CallMap.php | 2 +- dictionaries/CallMap_74_delta.php | 4 ++-- dictionaries/CallMap_80_delta.php | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 1c1985bcb02..d58a32cf21c 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -13907,7 +13907,7 @@ 'streamWrapper::unlink' => ['bool', 'path'=>'string'], 'streamWrapper::url_stat' => ['array', 'path'=>'string', 'flags'=>'int'], 'strftime' => ['string|false', 'format'=>'string', 'timestamp='=>'?int'], -'strip_tags' => ['string', 'string'=>'string', 'allowed_tags='=>'?string'], +'strip_tags' => ['string', 'string'=>'string', 'allowed_tags='=>'string'], 'stripcslashes' => ['string', 'string'=>'string'], 'stripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'], 'stripslashes' => ['string', 'string'=>'string'], diff --git a/dictionaries/CallMap_74_delta.php b/dictionaries/CallMap_74_delta.php index 91120d0a522..73f5a1ecaa6 100644 --- a/dictionaries/CallMap_74_delta.php +++ b/dictionaries/CallMap_74_delta.php @@ -46,8 +46,8 @@ 'new' => ['resource|false', 'command'=>'string|array', 'descriptor_spec'=>'array', '&pipes'=>'resource[]', 'cwd='=>'?string', 'env_vars='=>'?array', 'options='=>'?array'], ], 'strip_tags' => [ - 'old' => ['string', 'string'=>'string', 'allowed_tags='=>'?string'], - 'new' => ['string', 'string'=>'string', 'allowed_tags='=>'string|null|list'], + 'old' => ['string', 'string'=>'string', 'allowed_tags='=>'string'], + 'new' => ['string', 'string'=>'string', 'allowed_tags='=>'string|list'], ], ], 'removed' => [ diff --git a/dictionaries/CallMap_80_delta.php b/dictionaries/CallMap_80_delta.php index cd644320157..b977a789856 100644 --- a/dictionaries/CallMap_80_delta.php +++ b/dictionaries/CallMap_80_delta.php @@ -1381,6 +1381,10 @@ 'old' => ['string|false', 'format'=>'string', 'timestamp='=>'int'], 'new' => ['string|false', 'format'=>'string', 'timestamp='=>'?int'], ], + 'strip_tags' => [ + 'old' => ['string', 'string'=>'string', 'allowed_tags='=>'string|list'], + 'new' => ['string', 'string'=>'string', 'allowed_tags='=>'string|list|null'], + ], 'stripos' => [ 'old' => ['int|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'], 'new' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'], From 7678b349453eace5f73b25e167e617119ca78ab6 Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Tue, 22 Nov 2022 23:51:50 +0100 Subject: [PATCH 3/3] Update CallMap to reflect the most up-to-date signature --- dictionaries/CallMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index d58a32cf21c..29b5c304049 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -13907,7 +13907,7 @@ 'streamWrapper::unlink' => ['bool', 'path'=>'string'], 'streamWrapper::url_stat' => ['array', 'path'=>'string', 'flags'=>'int'], 'strftime' => ['string|false', 'format'=>'string', 'timestamp='=>'?int'], -'strip_tags' => ['string', 'string'=>'string', 'allowed_tags='=>'string'], +'strip_tags' => ['string', 'string'=>'string', 'allowed_tags='=>'string|list|null'], 'stripcslashes' => ['string', 'string'=>'string'], 'stripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int'], 'stripslashes' => ['string', 'string'=>'string'],