From 1aef2712906214fa0836c3e2067a8213bfeab072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sat, 16 Dec 2023 15:39:59 +0100 Subject: [PATCH] Fix class/method names case typos (#9261) * fix Mail_Mime case * fix StdErrMock case * fix method calls case --- program/include/rcmail_sendmail.php | 4 ++-- program/lib/Roundcube/cache/redis.php | 2 +- program/lib/Roundcube/rcube.php | 2 +- program/lib/Roundcube/rcube_image.php | 2 +- program/lib/Roundcube/rcube_utils.php | 2 +- tests/Framework/Ldap.php | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/program/include/rcmail_sendmail.php b/program/include/rcmail_sendmail.php index 39ff682477e..8b1b2a8664c 100644 --- a/program/include/rcmail_sendmail.php +++ b/program/include/rcmail_sendmail.php @@ -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]; } @@ -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) { diff --git a/program/lib/Roundcube/cache/redis.php b/program/lib/Roundcube/cache/redis.php index 4fc6a2b82da..e842c3922bc 100644 --- a/program/lib/Roundcube/cache/redis.php +++ b/program/lib/Roundcube/cache/redis.php @@ -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); diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index c616610c71d..729afe0aedc 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -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 diff --git a/program/lib/Roundcube/rcube_image.php b/program/lib/Roundcube/rcube_image.php index 079504a4954..8d2673854fe 100644 --- a/program/lib/Roundcube/rcube_image.php +++ b/program/lib/Roundcube/rcube_image.php @@ -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')) diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index 09bd0d7b65a..7f167592cd4 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -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); } diff --git a/tests/Framework/Ldap.php b/tests/Framework/Ldap.php index 3875b4b411a..b593de2d73f 100644 --- a/tests/Framework/Ldap.php +++ b/tests/Framework/Ldap.php @@ -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));