Skip to content

Commit

Permalink
Fix class/method names case typos (#9261)
Browse files Browse the repository at this point in the history
* fix Mail_Mime case

* fix StdErrMock case

* fix method calls case
  • Loading branch information
mvorisek authored Dec 16, 2023
1 parent a8707ae commit 1aef271
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions program/include/rcmail_sendmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ public static function extract_inline_images($message, $from)
$regexp = '#img[^>]+src=[\'"](data:([^;]*);base64,([a-z0-9+/=\r\n]+))([\'"])#i';
if (preg_match_all($regexp, $body, $matches, PREG_OFFSET_CAPTURE)) {
// get domain for the Content-ID, must be the same as in Mail_Mime::get()
// get domain for the Content-ID, must be the same as in Mail_mime::get()
if (preg_match('#@([0-9a-zA-Z\-\.]+)#', $from, $m)) {
$domain = $m[1];
}
Expand Down Expand Up @@ -1715,7 +1715,7 @@ public static function identity_select($message, $identities = null, $mode = nul
/**
* Collect message recipients' addresses
*
* @param Mail_Mime $message The email message
* @param Mail_mime $message The email message
*/
public static function collect_recipients($message)
{
Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/cache/redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ protected function add_item($key, $data)
}

try {
$result = self::$redis->setEx($key, $this->ttl, $data);
$result = self::$redis->setex($key, $this->ttl, $data);
}
catch (Exception $e) {
rcube::raise_error($e, true, false);
Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube.php
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,7 @@ public function gen_message_id($sender = null)
/**
* Send the given message using the configured method.
*
* @param Mail_Mime &$message Reference to Mail_MIME object
* @param Mail_mime &$message Reference to Mail_mime object
* @param string $from Sender address string
* @param array|string $mailto Either a comma-separated list of recipients (RFC822 compliant),
* or an array of recipients, each RFC822 valid
Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube_image.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public static function is_convertable($mimetype)
}

if (class_exists('Imagick', false)) {
return in_array($mimetype, Imagick::queryformats());
return in_array($mimetype, Imagick::queryFormats());
}

return (function_exists('imagecreatefromjpeg') && ($mimetype == 'JPG' || $mimetype == 'JPEG'))
Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube_utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ public static function date_format($format = null)

try {
$date = date_create_from_format('U.u', $dt);
$date->setTimeZone(new DateTimeZone(date_default_timezone_get()));
$date->setTimezone(new DateTimeZone(date_default_timezone_get()));

return $date->format($format);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Framework/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ function test_class()
$this->markTestSkipped('The ldap extension is not available.');
}

StdErrMock::start();
StderrMock::start();
$object = new rcube_ldap([]);
StdErrMock::stop();
StderrMock::stop();

$this->assertInstanceOf('rcube_ldap', $object, "Class constructor");
$this->assertSame('ERROR: Could not connect to any LDAP server', trim(StderrMock::$output));
Expand Down

0 comments on commit 1aef271

Please sign in to comment.