I get the width and height of image with getimagesize function, like below:
list($width,$height) = getimagesize($source_pic);
How can I use IF condition to check that the getimagesize function executed without error and $width and $height got non-empty, non-zero values?