the easy fix if to turn off the warning messages in php for now.
Or replace
if (((($max_width/$max_height)==($download_multi_sizes[$var][1]/$download_multi_sizes[$var][2]))&&($multi_download_var['ratio']))||(!$multi_download_var['ratio'])){
With this:
if (!$multi_download_var['ratio'] || (@($max_width/$max_height)==@($download_multi_sizes[$var][1]/$download_multi_sizes[$var][2])&&$multi_download_var['ratio'])){
Note the "@" signs, these will suppress any warnings.
P.S.
you don't have to include everything into parentheses and also when there is an "OR" condition it's better put first the most simple condition, could possible save 0.00001% on performance