thephpleague / color-extractor

Extract colors from an image like a human would do.
thephpleague.com
MIT License
1.3k stars 159 forks source link

If no interesting colours, return empty array #62

Closed DaveChild closed 2 years ago

DaveChild commented 4 years ago

If $colors has zero elements, the "$labCache = new \SplFixedArray($limit - 1);" line will error while trying to create an array with -1 elements.

colinodell commented 2 years ago

Fixed in v0.4.0. Thanks for the PR!