ensure wall_upload always has width and height if the image is valid

This commit is contained in:
friendica 2014-03-25 12:44:30 -07:00
parent 50a7e9ce8f
commit 8547e4b2a8
2 changed files with 6 additions and 2 deletions

View File

@ -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();

View File

@ -1 +1 @@
2014-03-24.626
2014-03-25.627