From b3081559c573b792381000db6d960f60163b60e4 Mon Sep 17 00:00:00 2001 From: Samarth <52947414+SamarthRanjanRay@users.noreply.github.com> Date: Sun, 15 Sep 2019 20:25:02 +0530 Subject: [PATCH] Added functionality for 0 in text I tried to solve the issue #13 This solution will most probably work if a person adds "0" in the text section. The reason it didn't work was line 172, $_GET['text'] which will of course see 0 and return false, making the compiler jump the if statements. I hope this gets the job done. --- code.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code.php b/code.php index c146535..212c1fa 100755 --- a/code.php +++ b/code.php @@ -169,7 +169,7 @@ function imagettfbbox_t( $size, $text_angle, $fontfile, $text ){ } } -if ( isset( $_GET['text'] ) && $_GET['text'] ) { +if ( isset( $_GET['text'] ) && ($_GET['text'] || $_GET['text']==0 || $_GET['text']=="0") ) { $_GET['text'] = preg_replace_callback( "/(0x[0-9A-F]{,3})/ui", function( $matches ) {