gracias por la preocupacion, mira aqui pego toda la funcion donde divide por cero...
igual la rutie y puse impresiones echos para ver que valores arroja pero parece que es el return $button que devuelve cero siempre....
Código PHP:
Ver originalfunction generateButtons($idNewsletter = null,$titulo,$from,$subjetc,$range,$list){
global $wpdb;
$num = listandusers::howUserHaveInList($list);
if($list == 'all')$list = 0;
if ($range == 'all'){
$boton = '<a href="javascript:sendmail(null,0,'.$list.',1)" style="display:block; margin:0; padding:10px 10px; background:#444; color:#fff; text-decoration:none">'. __("Send", 'meenews').'</a>';
$button .= "<p style='padding:0 0 0 10px; background:#eee; overflow:hidden'><span style='float:left; margin:10px 0 0 0;'>".__("Range ", 'meenews')."<b>".__(" Send All List ", 'meenews')."</b></span><span style='float:right'>$boton</span></p>";
$button .='<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #ccc; font-size:10px;display:none" id="result1">
<tr>
<td align="center" style="padding:3px; font-weight:bold; border-bottom:1px solid #bbb; font-size:11px">'.__("Send Ok ", 'meenews').'</td>
<td align="center" style="padding:3px; font-weight:bold; border-bottom:1px solid #bbb; font-size:11px">'.__("Send Wrong ", 'meenews').'</td>
<td align="center" style="padding:3px; font-weight:bold; border-bottom:1px solid #bbb; font-size:11px">'.__("Send Test ", 'meenews').'</td>
</tr>
<tr>
<td id="ok1"> </td>
<td id="wrong1"> </td>
<td id="test1"> </td>
</tr>
</table>';
}else{
$buttons = ceil( $num / $range);
for ($i = 1; $i <= $buttons; $i++){
$ta = $range * ($i-1);
$ti = $range * $i;
$boton = '<a href="javascript:sendmail('.$ta.','.$ti.','.$list.','.$i.')" style="display:block; margin:0; padding:10px 10px; background:#444; color:#fff; text-decoration:none">'. __("Send", 'meenews').'</a>';
$button .= "<p style='padding:0 0 0 10px; background:#eee; overflow:hidden'><span style='float:left; margin:10px 0 0 0;'>".__("Range ", 'meenews')."<b>$ta</b>".__(" to ", 'meenews')."<b>$ti</b></span><span style='float:right'>$boton</span></p>";
$button .='<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #ccc; font-size:10px;display:none" id="result'.$i.'">
<tr>
<td align="center" style="padding:3px; font-weight:bold; border-bottom:1px solid #bbb; font-size:11px">'.__("Send Ok ", 'meenews').'</td>
<td align="center" style="padding:3px; font-weight:bold; border-bottom:1px solid #bbb; font-size:11px">'.__("Send Wrong ", 'meenews').'</td>
<td align="center" style="padding:3px; font-weight:bold; border-bottom:1px solid #bbb; font-size:11px">'.__("Send Test ", 'meenews').'</td>
</tr>
<tr>
<td id="ok'.$i.'"> </td>
<td id="wrong'.$i.'"> </td>
<td id="test'.$i.'"> </td>
</tr>
</table>';
meenewsCore::createSendCola($idNewsletter,$ta,$ti,$list,$i,$range);
}
}
return $button;
}
PD: tambien me fije que si no elijo ni categoria ni tipo de envio "todos" "de 10 en 10 " "de 20 en 20" no respeta el else y pasa y divide igual por cero