Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#39702 closed defect (bug) (fixed)

Minor typo in wp_mail function

Reported by: reidbusi's profile reidbusi Owned by: sergeybiryukov's profile 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 8 years ago.
Changes methods form PascalCase to camelCase
39702.2.diff (1.9 KB) - added by Soean 8 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
8 years ago

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

@Soean
8 years ago

Changes methods form PascalCase to camelCase

#2 @Soean
8 years ago

  • Keywords has-patch added

@Soean
8 years ago

#3 @SergeyBiryukov
7 years 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.