PHP Warning: imagestring() expects parameter 2 to be long, string given

See all posts Reply

PHP Warning: imagestring() expects parameter 2 to be long, string given new!
by Suraj, 4 years, 7 months ago
This is my code..
$merge->image_text = 'TEST';
$merge->image_text_font = 'MyriadPro-Regular_0.otf';
$merge->image_text_size = 24;

I'm keep getting this error : PHP Warning: imagestring() expects parameter 2 to be long, string given : class.upload.php on line 4476

imagestring($filter,
            $this->image_text_font,
            ($this->image_text_alignment == 'l' ? 0 : (($t_width - strlen($v) * $char_width) / ($this->image_text_alignment == 'r' ? 1 : 2))),
            $k * ($line_height  + ($k > 0 && $k < (sizeof($text)) ? $this->image_text_line_spacing : 0)),
            $v,
            $text_color);
Reply
Re: PHP Warning: imagestring() expects parameter 2 to be long, string given new!
by colin, 4 years, 7 months ago
Please check out the documentation. image_text_font can accept a GDF font, or a TTF font, or a GD font number. OTF is not supported.Reply