Jump to content

Typo in \Email\Incoming\Email::route()


Recommended Posts

Hi,

I found a typo in \Email\Incoming\Email::route(), line 709 :

$analyze	= NULL;

 

This var is then called « $analyse » in the rest of the code:

switch ( $row['rule_criteria_field'] )
{
  case 'to':
    $analyse = implode( ',', $this->to );
    break;

  case 'from':
    $analyse = $this->from;
    break;

  case 'sbjt':
    $analyse = $this->subject;
    break;

  case 'body':
    $analyse = $this->message;
    break;
}

/* Now check if we match the supplied rule */
switch ( $row['rule_criteria_type'] )
{
  case 'ctns':
    $match = (bool) ( mb_strpos( $analyse, $row['rule_criteria_value'] ) !== FALSE );
    break;

  case 'eqls':
    if ( mb_strpos( $analyse, ',' ) !== FALSE )
    {
    	$match = (bool) \in_array( $analyse, explode( ',', $analyse ) );
    }
    else
    {
    	$match = (bool) ( $analyse == $row['rule_criteria_value'] );
    }
    break;

  case 'regx':
  	$match = (bool) ( preg_match( "/{$row['rule_criteria_value']}/", $analyse ) == 1 );
  	break;
}

 

This has no impact thanks to the switch, bit it's still a typo 🙂 

Thank you,

Link to comment
Share on other sites

  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...