Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bug closed - now what?


Nils P.

Recommended Posts

Hi,

 

I recently reported two bugs and they were actually fixed, and are now marked as closed. It says "Fixed in CVS... This fix will be available..."

Great, but how do I find out how it was fixed? I downloaded a snapshot, but can't find anything about fixed bugs at all. I don't want to install a CVS snapshot version as my MS2 installation is running fine with lots of small hacks and contributions - I'd like to do fixes manually myself.

 

Thanks,

Nils

Link to comment
Share on other sites

What were the bugs that were fixed?

 

If you give me the bugs numbers I will supply the diff :)

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Here is a diff for that commit

 

 

<           $width = $image_size[0] * $ratio;
---
>           $width = (int)$image_size[0] * $ratio;
94c94
<           $height = $image_size[1] * $ratio;
---
>           $height = (int)$image_size[1] * $ratio;
96,97c96,97
<           $width = $image_size[0];
<           $height = $image_size[1];
---
>           $width = (int)$image_size[0];
>           $height = (int)$image_size[1];

 

It basically involves putting the word (int) before the size is set.

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Oops Mark, I didn't notice at first, but the new code doesn't really fix the bug, I just checked. To actually fix this issue, you'd have to do these two lines as I have them in the bug report:

 

$width = (int)($image_size[0] * $ratio);

$height = (int)($image_size[1] * $ratio);

 

I.e., with the extra brackets, otherwise the results will still not be integers, because $ratio will often not be an integer.

You have it like this:

 

> $width = (int)$image_size[0] * $ratio;

> $height = (int)$image_size[1] * $ratio;

 

...which doesn't change anything, unfortunately.

 

$image_size are always integers, because they're the true width/height of images (the amount of pixels, actually).

That's also the reason why this change:

 

> $width = (int)$image_size[0];

> $height = (int)$image_size[1];

 

is superfluous.

 

< $width = $image_size[0];

< $height = $image_size[1];

 

...was ok, I'd recommend undoing this one.

Should I post this to bug report 1371 ?

 

Regards,

Nils

Link to comment
Share on other sites

Thanks for letting me know, I did initial testing and all seemed to work ok, I will check this out some more.

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...