Bug #81693 [Opn->Ver]: mb_check_encoding does not return a value but quits php

From: Date: Fri, 03 Dec 2021 17:45:04 +0000
Subject: Bug #81693 [Opn->Ver]: mb_check_encoding does not return a value but quits php
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238154@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81693&edit=1 ID: 81693 Updated by: cmb@php.net Reported by: richardbrinkman at hotmail dot com Summary: mb_check_encoding does not return a value but quits php -Status: Open +Status: Verified Type: Bug Package: mbstring related Operating System: Debian (php:8.1-apache docker) PHP Version: 8.1.0 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2021-12-03 17:44:51] cmb@php.net The following pull request has been associated: Patch Name: Fix #81693: mb_check_encoding(7bit) segfaults On GitHub: https://github.com/php/php-src/pull/7712 Patch: https://github.com/php/php-src/pull/7712.patch ------------------------------------------------------------------------ [2021-12-03 14:27:54] richardbrinkman at hotmail dot com Description: ------------ Write a file test.php with the content of the attached test script: Run this script with "php test.php" results in: Segmentation fault (core dumped) I use the php:apache Docker image. If I run the same script with the php:8.0-apache Docker image then it will return the correct: bool(true) Both docker images install mbstring with: docker-php-ext-install mbstring Test script: --------------- <?php var_dump(mb_check_encoding('Hello world', '7bit')); ?> Expected result: ---------------- bool(true) Actual result: -------------- Segmentation fault (core dumped) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81693&edit=1

« previous php.bugs (#238154) next »