1--TEST-- 2Check for empty pattern 3--SKIPIF-- 4<?php 5extension_loaded('mbstring') or die('skip mbstring not available'); 6if (!function_exists('mb_ereg')) die('skip mbregex support not available'); 7?> 8--FILE-- 9<?php 10 11try { 12 mb_ereg_search_init("","",""); 13} catch (\ValueError $e) { 14 echo $e->getMessage() . \PHP_EOL; 15} 16 17mb_split("",""); 18 19try { 20 mb_ereg_search_regs(); 21} catch (\Error $e) { 22 echo $e->getMessage() . \PHP_EOL; 23} 24 25?> 26--EXPECT-- 27mb_ereg_search_init(): Argument #2 ($pattern) must not be empty 28No pattern was provided 29