-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BugFix : count() func error when textColor is null #89
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -348,6 +348,11 @@ protected function writePhrase($image, $phrase, $font, $width, $height) | |||||
$x = ($width - $textWidth) / 2; | ||||||
$y = ($height - $textHeight) / 2 + $size; | ||||||
|
||||||
// Define a empty array when textColor is null | ||||||
if(is_null($this->textColor)){ | ||||||
$this->textColor = array(); | ||||||
} | ||||||
|
||||||
if (!$this->textColor) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So when textColor always be an array, why should it compared with null? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see you edit it. |
||||||
$textColor = array($this->rand(0, 150), $this->rand(0, 150), $this->rand(0, 150)); | ||||||
} else { | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.