Closed pluus closed 4 years ago
The ! expression also takes null. If you don't want to pass the height, you should do like this aq_resize($url, $width, null);
That will make the function not throwing exception. But I agree, the doc should be improved.
I see. Thanks, menshinobi !
I have the same problem, when I set height to null, it also throw exception. So, i delete "if (!$height)..." and i work normally.
@NautHnim Hmph, I tried it too and it doesn't work :( Clearly, either the source code or the documentation needs to be updated.
You can set height = -1, it should work if you want an unspecified height!
According to 'How to use',
aq_resize($img_url, $width);
this is a valid code and the update log(v1.1.7) clearly mentions "either $width or $height is required". However, if you take a look at the source code(v1.2.1) of aq_resize function,
this function requires at least three parameters - url, width, and height. Is it supposed to work this way?