e107inc/e107

View on GitHub
e107_admin/mailout.php

Summary

Maintainability
A
0 mins
Test Coverage
F
10%

Possibly zero references to use statement for classlike/namespace PHPMailer (\PHPMailer\PHPMailer\PHPMailer)
Open

use PHPMailer\PHPMailer\PHPMailer;
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if (!getperms('0'))
Severity: Minor
Found in e107_admin/mailout.php by phan

Assigning array{0:'checkboxes',1:'mail_source_id',2:'mail_title',3:'mail_subject',4:'mail_total_count',5:'mail_togo_count',6:'mail_sent_count',7:'mail_fail_count',8:'mail_bounce_count',9:'options'} to property but \mailout_main_ui->fieldpref is array{0:'checkboxes',1:'mail_source_id',2:'mail_title',3:'mail_subject',4:'mail_content_status',5:'options'}
Open

            $this->fieldpref = array('checkboxes', 'mail_source_id', 'mail_title', 'mail_subject','mail_total_count', 'mail_togo_count', 'mail_sent_count', 'mail_fail_count', 'mail_bounce_count', 'options');    
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            e107::getMessage()->addSuccess(str_replace('[x]', $mailId, LAN_MAILOUT_220));
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to method getMessage from undeclared class \PHPMailer\PHPMailer\Exception (Did you mean class \Exception)
Open

            $mes->addError('SMTP error: ' . $e->getMessage());
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if (!getperms('0'))
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to deprecated function \e107::getDateConvert() defined at /code/e107_handlers/e107_class.php:1948
Open

            $first = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, FALSE);
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_221);
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (value) is 0 but \e_form::progressBar() takes \number|string defined at /code/e107_handlers/form_handler.php:2298
Open

            $text = e107::getForm()->progressBar('mail-progress',0, array('btn-label'=>'Start', 'interval'=>$interval, 'url'=> e_SELF, 'mode'=>$id));
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            e107::getMessage()->addSuccess(str_replace('[x]', $mailId, LAN_MAILOUT_187));
Severity: Minor
Found in e107_admin/mailout.php by phan

Variable $errors was undeclared, but array fields are being added to it.
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_166);
Severity: Info
Found in e107_admin/mailout.php by phan

Call to method getServerExtList from undeclared class \PHPMailer\PHPMailer\SMTP
Open

            $e = $smtp->getServerExtList();
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to method __construct from undeclared class \PHPMailer\PHPMailer\SMTP
Open

        $smtp = new SMTP;
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to method getError from undeclared class \PHPMailer\PHPMailer\SMTP
Open

                $mes->addError('EHLO failed: ' . $smtp->getError()['error']);
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to method getServerExtList from undeclared class \PHPMailer\PHPMailer\SMTP
Open

                $e = $smtp->getServerExtList();
Severity: Critical
Found in e107_admin/mailout.php by phan

Returning type void but prefsPage() is declared to return string
Open

            return;
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 3 (checked) is ''|'checked=\'checked\'' but \e_form::checkbox() takes bool|false defined at /code/e107_handlers/form_handler.php:2671
Open

                $text .= $frm->checkbox('mail_mailer_enabled[]',$mailer,$check,$name);
Severity: Minor
Found in e107_admin/mailout.php by phan

Variable $errors was undeclared, but array fields are being added to it.
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_221);
Severity: Info
Found in e107_admin/mailout.php by phan

Call to method connect from undeclared class \PHPMailer\PHPMailer\SMTP
Open

            if(!$smtp->connect($pref['smtp_server'], $port))
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to method getError from undeclared class \PHPMailer\PHPMailer\SMTP
Open

                    $mes->addError('Failed to start encryption: ' . $smtp->getError()['error']);
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to method hello from undeclared class \PHPMailer\PHPMailer\SMTP
Open

                if(!$smtp->hello(gethostname()))
Severity: Critical
Found in e107_admin/mailout.php by phan

Assigning array<string active></string> to property but \mailout_main_ui->fields is array{checkboxes:array{title:'',type:null,width:'5%',forced:true,thclass:'center',class:'center'},mail_source_id:array{title:'Mail Ref',type:'number',width:'5%',thclass:'center',class:'center',forced:true},mail_selectors:array{title:'To',type:'method',data:false,nolist:true,writeParms:'nolabel=0'},mail_title:array{title:'Title',type:'text',forced:true,data:'str',inline:true,writeParms:'size=xxlarge&required=1',help:''},mail_sender_name:array{title:'Sender Name',type:'method',data:false},mail_sender_email:array{title:'Sender Email',type:'method',data:false},mail_copy_to:array{title:'Copy to',tab:1,type:'method',data:false},mail_bcopy_to:array{title:'Blind copy to',tab:1,type:'method',data:false},mail_subject:array{title:'Subject',type:'text',forced:true,data:'str',inline:true,writeParms:'size=xxlarge&required=1'},mail_content_status:array{title:'Mailout Status',tab:1,type:'dropdown',data:'int',filter:false,inline:false,thclass:'left',class:'left'},mail_total_count:array{title:'Total Recipients',noedit:true,type:'number'},mail_sent_count:array{title:'Mails sent',noedit:true,type:'number'},mail_togo_count:array{title:'Mails to go',noedit:true,type:'number'},mail_fail_count:array{title:'Send Error',noedit:true,type:'number'},mail_bounce_count:array{title:'Bounced',noedit:true,type:'number'},mail_start_send:array{title:'Sending Started',noedit:true,type:'datestamp'},mail_end_send:array{title:'Sending Complete',noedit:true,type:'datestamp'},mail_create_date:array{title:'Creation Date',type:null,noedit:true,data:'int'},mail_creator:array{title:'Originator',type:null,noedit:true,data:'int'},mail_create_app:array{title:'Source',type:null,noedit:true,data:'str'},mail_e107_priority:array{title:'Priority',noedit:true},mail_notify_complete:array{title:'Notify',noedit:true,nolist:true},mail_last_date:array{title:'Expiry Date',noedit:true,type:'int',proc:'sdatetime'},mail_attach:array{title:'Attachments',tab:1,type:'method',data:false},mail_include_images:array{title:'Inc. Images',tab:1,type:'boolean',data:false,proc:'yesno'},mail_send_style:array{title:'Send Format',type:'method',data:false},mail_media:array{title:'Embed Media',type:'images',data:'array',width:'auto',help:'',readParms:'',writeParms:'video=1',class:'center',thclass:'center'},mail_body:array{title:'Message',type:'bbarea',proc:'trunc200'},mail_body_templated:array{title:'Generated template',noedit:true,proc:'chars'},mail_other:array{title:'Mail ID',type:null,noedit:true,data:'array',nolist:true},options:array{title:'Options',type:'method',width:'10%',forced:true}}
Open

        $this->fields['mail_content_status']['writeParms'] = $types; 
Severity: Minor
Found in e107_admin/mailout.php by phan

Variable $errors was undeclared, but array fields are being added to it.
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_188);
Severity: Info
Found in e107_admin/mailout.php by phan

Catching undeclared class \PHPMailer\PHPMailer\Exception (Did you mean class \Exception)
Open

        catch(Exception $e)
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to deprecated function \e107::getDateConvert() defined at /code/e107_handlers/e107_class.php:1948
Open

            $last = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, TRUE);
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to method hello from undeclared class \PHPMailer\PHPMailer\SMTP
Open

            if(!$smtp->hello(gethostname()))
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

if (!getperms('W'))
Severity: Minor
Found in e107_admin/mailout.php by phan

Assigning array<string smtp connection></string> to property but \mailout_admin->adminMenu is array<string>&gt;|array{main/list:array{caption:'Manage',perm:'W'},main/create:array{caption:'Create',perm:'W'},recipients/list:array{caption:'Recipients',perm:'W'},other:array{divider:true},pending/list:array{caption:'Pending Mailshots',perm:'W'},held/list:array{caption:'Held Mailshots',perm:'W'},sent/list:array{caption:'Completed Mailshots',perm:'W'},other2:array{divider:true},prefs/prefs:array{caption:'Preferences',perm:'0'},maint/maint:array{caption:'Maintenance',perm:'0'},main/templates:array{caption:'Template Preview',perm:'0'}}</string>
Open

            $this->adminMenu['prefs/test'] =array('caption'=> LAN_MAILOUT_270, 'perm' => '0'); //TODO LAN
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if (getperms('0'))
Severity: Minor
Found in e107_admin/mailout.php by phan

Reference to constant DEBUG_CONNECTION from undeclared class \PHPMailer\PHPMailer\SMTP
Open

        $smtp->do_debug = SMTP::DEBUG_CONNECTION;
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to method getError from undeclared class \PHPMailer\PHPMailer\SMTP
Open

                    $mes->addError('EHLO (2) failed: ' . $smtp->getError()['error']);
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to method quit from undeclared class \PHPMailer\PHPMailer\SMTP
Open

        $smtp->quit(true);
Severity: Critical
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_188);
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to method authenticate from undeclared class \PHPMailer\PHPMailer\SMTP
Open

                if($smtp->authenticate($username, $pwd))
Severity: Critical
Found in e107_admin/mailout.php by phan

Call to method getError from undeclared class \PHPMailer\PHPMailer\SMTP
Open

                    $mes->addError($msg . $smtp->getError()['error']);
Severity: Critical
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_166);
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to method startTLS from undeclared class \PHPMailer\PHPMailer\SMTP
Open

                $tlsok = $smtp->startTLS();
Severity: Critical
Found in e107_admin/mailout.php by phan

Possibly zero references to use statement for classlike/namespace POP3 (\PHPMailer\PHPMailer\POP3)
Open

use PHPMailer\PHPMailer\POP3;
Severity: Minor
Found in e107_admin/mailout.php by phan

Reference to instance property do_debug from undeclared class \PHPMailer\PHPMailer\SMTP
Open

        $smtp->do_debug = SMTP::DEBUG_CONNECTION;
Severity: Minor
Found in e107_admin/mailout.php by phan

Variable $update is undeclared
Open

            e107::getMessage()->addDebug(print_a($update,true));    
Severity: Minor
Found in e107_admin/mailout.php by phan

Suspicious array access to nullable ?array
Open

            $errors[] = str_replace(array('[x]', '[z]'), array($mailId, intval($_POST['mailIDConf'])), LAN_MAILOUT_174);
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if (getperms('0'))
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (value) is 1 but \e_form::button() takes array|string defined at /code/e107_handlers/form_handler.php:3862
Open

        $text .= "<tr><td>DomainKeys Identified Mail (DKIM)</td><td class='form-inline'>".$frm->button('DKIM_generate',1,'primary',LAN_MAILOUT_267)."
Severity: Minor
Found in e107_admin/mailout.php by phan

Reference to undeclared property \e_admin_ui->mailAdmin
Open

        return         $controller->mailAdmin->makeMailOptions($mode,$mailData);    
Severity: Minor
Found in e107_admin/mailout.php by phan

Reference to undeclared property \e_admin_ui->mailManager
Open

            return "<span class='label ".varset($stat[$curVal])."'>#".$curVal." ".$this->getController()->mailManager->statusToText($curVal)."</span>";
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 3 (selected) is string but \e_form::select() takes bool|false defined at /code/e107_handlers/form_handler.php:3311
Open

        ".$frm->select('mail_log_option',$logOptions,$mail_log_option);
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_230);
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_188);
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 1 (mailData) is ?array|?array{mail_body_alt:false}|?array{mail_body_templated:false}|?array{mail_content_status:20}|?array{mail_create_app:'core'}|?array{mail_overrides:}|?array{mail_selectors:array}|?array{mail_source_id:float|int|string}|?array{mail_source_id:int}|null but \mailoutAdminClass::sendEmailCircular() takes array defined at /code/e107_handlers/mailout_admin_class.php:1527
Open

        $mailAdmin->sendEmailCircular($mailData, $fromHold);
Severity: Minor
Found in e107_admin/mailout.php by phan

Suspicious array access to nullable ?array
Open

        $id = array_keys($_POST['mailaction']);
Severity: Minor
Found in e107_admin/mailout.php by phan

Reference to undeclared property \e_admin_ui->mailAdmin
Open

                return $this->getController()->mailAdmin->sendStyleSelect(varset($data['mail_send_style'], ''),'mail_send_style');
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

                    $mes->addSuccess(str_replace('[x]', $mailId, LAN_MAILOUT_167));
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to undeclared function \sendImmediately()
Open

        sendImmediately($id[0]);
Severity: Critical
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_221);
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

                    $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_169);
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 3 (checked) is ' checked=\'checked\''|'' but \e_form::checkbox() takes bool|false defined at /code/e107_handlers/form_handler.php:2671
Open

    $text .= " ".$frm->checkbox('mail_log_email', 1, $check, 'label='.LAN_MAILOUT_76);
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

                $mes->addSuccess(str_replace('[x]', $mailId, LAN_MAILOUT_187));
Severity: Minor
Found in e107_admin/mailout.php by phan

Variable $temp is undeclared
Open

        unset($temp);
Severity: Minor
Found in e107_admin/mailout.php by phan

Variable $temp was undeclared, but array fields are being added to it.
Open

        $temp['mailer'] = $_POST['mailer'];
Severity: Info
Found in e107_admin/mailout.php by phan

Variable $att was undeclared, but array fields are being added to it.
Open

            $att['readParms']['editClass'] = e_UC_NOBODY;
Severity: Info
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

                    $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_167);
Severity: Minor
Found in e107_admin/mailout.php by phan

Function headerjs defined at /code/e107_admin/mailout.php:2734 was previously defined at /code/e107_admin/administrator.php:197
Open

    function headerjs()
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if(!getperms('0'))
Severity: Minor
Found in e107_admin/mailout.php by phan

Assigning array<string></string> to property but \mailout_recipients_ui->fields is array{checkboxes:array{title:'',type:null,width:'5%',forced:true,thclass:'center',class:'center'},mail_target_id:array{title:'Recipient ref.',thclass:'left',forced:true},mail_recipient_id:array{title:'Recipient User ID',type:'number',data:'int',thclass:'left',readonly:2},mail_recipient_name:array{title:'Recipient Name',type:'text',data:'str',readonly:2,forced:true},mail_recipient_email:array{title:'Recipient Email',type:'email',data:'str',thclass:'left',forced:true},mail_status:array{title:'Email status',type:'method',filter:true,data:'int',thclass:'left',class:'left',writeParms:''},mail_detail_id:array{title:'Mail Ref',type:'dropdown',filter:true},mail_send_date:array{title:'Date active',type:'datestamp',proc:'sdatetime'},mail_target_info:array{title:'User values',proc:'array'},options:array{title:'Options',type:'method',width:'10%',forced:true}}
Open

        $this->fields['mail_detail_id']['writeParms'] = varset($array, array());
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            $mes->addSuccess(str_replace('[x]', $mailId, LAN_MAILOUT_229));
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to deprecated function \e107::getDateConvert() defined at /code/e107_handlers/e107_class.php:1948
Open

            $last = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, TRUE);
Severity: Minor
Found in e107_admin/mailout.php by phan

Variable $ns is undeclared
Open

     $ns->tablerender(LAN_MAILOUT_97, $mes->render());
Severity: Minor
Found in e107_admin/mailout.php by phan

Saw an @param annotation for id, but the param list of function headerjs(); is empty
Open

    function headerjs()
Severity: Info
Found in e107_admin/mailout.php by phan

Reference to undeclared property \e_admin_ui->mailAdmin
Open

                return $this->getController()->mailAdmin->emailSelector('all', varset($data['mail_selectors'], FALSE));    
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_166);
Severity: Minor
Found in e107_admin/mailout.php by phan

Call to deprecated function \e107::getDateConvert() defined at /code/e107_handlers/e107_class.php:1948
Open

            $first = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, FALSE);
Severity: Minor
Found in e107_admin/mailout.php by phan

Saw unextractable annotation for comment '* @return'
Open

    function headerjs()
Severity: Info
Found in e107_admin/mailout.php by phan

Variable $array was undeclared, but array fields are being added to it.
Open

            $array[$id] = $id." : ".vartrue($row['mail_title'], "(No Name)");    
Severity: Info
Found in e107_admin/mailout.php by phan

Variable $mailData was undeclared, but array fields are being added to it.
Open

        $mailData['mail_source_id'] = $mailId;
Severity: Info
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

            $mes->addSuccess(str_replace('[x]', $mailId, LAN_MAILOUT_220));
Severity: Minor
Found in e107_admin/mailout.php by phan

Argument 2 (replace) is int but \str_replace() takes array|string
Open

                $errors[] = str_replace('[x]', $mailId, LAN_MAILOUT_166);
Severity: Minor
Found in e107_admin/mailout.php by phan

Variable $att was undeclared, but array fields are being added to it.
Open

            $att['readParms']['editClass'] = e_UC_MAINADMIN;
Severity: Info
Found in e107_admin/mailout.php by phan

Call to undeclared function \show_prefs()
Open

            show_prefs($mailAdmin);
Severity: Critical
Found in e107_admin/mailout.php by phan

There are no issues that match your filters.

Category
Status