1--TEST-- 2Test function readgzfile() by substituting argument 1 with emptyUnsetUndefNull values. 3--SKIPIF-- 4<?php 5if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); 6?> 7--FILE-- 8<?php 9 10 11$use_include_path = false; 12 13 14$unset_var = 10; 15unset($unset_var); 16 17$variation = array( 18 'unset var' => @$unset_var, 19 'undefined var' => @$undefined_var, 20 'empty string DQ' => "", 21 'empty string SQ' => '', 22 'uppercase NULL' => NULL, 23 'lowercase null' => null, 24 ); 25 26 27foreach ( $variation as $var ) { 28 try { 29 var_dump(readgzfile( $var , $use_include_path ) ); 30 } catch (\ValueError $e) { 31 echo $e->getMessage() . \PHP_EOL; 32 } 33} 34?> 35--EXPECT-- 36Path cannot be empty 37Path cannot be empty 38Path cannot be empty 39Path cannot be empty 40Path cannot be empty 41Path cannot be empty 42