ensure wall_upload always has width and height if the image is valid
This commit is contained in:
parent
50a7e9ce8f
commit
8547e4b2a8
@ -174,10 +174,10 @@ function photo_upload($channel, $observer, $args) {
|
||||
$p['scale'] = 2;
|
||||
$r3 = $ph->save($p);
|
||||
$smallest = 2;
|
||||
$width_x_height = $ph->getWidth() . 'x' . $ph->getHeight();
|
||||
if(! $r3)
|
||||
$errors = true;
|
||||
}
|
||||
|
||||
|
||||
if($errors) {
|
||||
q("delete from photo where resource_id = '%s' and uid = %d",
|
||||
@ -190,6 +190,10 @@ function photo_upload($channel, $observer, $args) {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// This will be the width and height of the smallest representation
|
||||
|
||||
$width_x_height = $ph->getWidth() . 'x' . $ph->getHeight();
|
||||
|
||||
$basename = basename($filename);
|
||||
$mid = item_message_id();
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2014-03-24.626
|
||||
2014-03-25.627
|
||||
|
Reference in New Issue
Block a user