WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 9 months ago

#39702 closed defect (bug) (fixed)

Minor typo in wp_mail function

Reported by: reidbusi Owned by: SergeyBiryukov
Milestone: 4.8 Priority: normal
Severity: trivial Version: 4.7.1
Component: Mail Keywords: has-patch
Focuses: Cc:

Description

While working on a plugin, I have discovered that wp_mail calls:

\wp-includes\pluggable.php(453):

<?php
$phpmailer->AddAttachment($attachment);

Where the method in the class is...
\wp-includes\class-phpmailer(2506):

<?php
public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment')

I note that PHP function names are case insensitive:

Note: Function names are case-insensitive, though it is usually good form to call functions as they appear in their declaration.

User-defined functions

So, this does not affect anything really, other than my OCD. Do with it as you will.

Attachments (2)

39702.diff (1.0 KB) - added by Soean 11 months ago.
Changes methods form PascalCase to camelCase
39702.2.diff (1.9 KB) - added by Soean 11 months ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
11 months ago

  • Milestone changed from Awaiting Review to 4.8
  • Severity changed from normal to trivial

@Soean
11 months ago

Changes methods form PascalCase to camelCase

#2 @Soean
11 months ago

  • Keywords has-patch added

@Soean
11 months ago

#3 @SergeyBiryukov
9 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 40363:

Mail: Use correct capitalization for PHPMailer methods in wp_mail().

Props Soean, reidbusi.
Fixes #39702.

Note: See TracTickets for help on using tickets.