Hola por aquí, necesito me ayuden con algo, pues no entiendo mucho de PHPOO
Tengo un sitio montado en Pligg y trae la opción de enviar los artículos a un amigo, pero no funciona, mandaba este error:
Warning: implode() [function.implode]: Bad arguments. in /home/public_html/libs/mailer.php on line 31
Este es el código original:
Código php:
Ver original<?php
class PliggMailer{
var $subject = '';
var $body = '';
var $from = '';
var $to = '';
function PliggMailer($subj = '', $body = '', $from = '', $to = '', $cc = '', $bcc = ''){
if($subj != ''){$this->subject = $subj;}
if($body != ''){$this->body = $body;}
if($from != ''){$this->from = $from;}
if(count($to) == 0){$this->to = $to;} if(count($to) == 0){$this->to = $to;} if(count($to) == 0){$this->to = $to;}
}
function send(){
if($this->from != ''){
$headers = 'From: ' . $this->from;
} else {
$headers = '';
}
$send_to = implode(',', $this->to);
if(mail($send_to, $this->subject, $this->body, $headers)){ return true;
} else {
return false;
}
}
}
?>
y lo que hice fue cambiar este línea
var $to = ''; por
var $to = array(''); (la linea 7). Ya no me da el error, pero tampoco envía el mensaje
Que pasa???
Gracias mil de antemano