Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#5933 closed defect (bug) (fixed)

Warning on error log for bp_modify_page_title()

Reported by: slaffik's profile slaFFik Owned by: djpaul's profile djpaul
Milestone: 2.2 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch
Cc:

Description

Always getting these errors in pair on front-end:

PHP Warning:  Missing argument 2 for bp_modify_page_title() in /home/domains/cosydale.com/www/wp-content/plugins/buddypress/bp-core/bp-core-filters.php on line 426, referer: http://cosydale.com/wp-admin/index.php
PHP Warning:  Missing argument 3 for bp_modify_page_title() in /home/domains/cosydale.com/www/wp-content/plugins/buddypress/bp-core/bp-core-filters.php on line 426, referer: http://cosydale.com/wp-admin/index.php

Because of search robots, error log file is polluted very quickly.

Attachments (2)

5933.patch (602 bytes) - added by imath 10 years ago.
5933.2.patch (549 bytes) - added by whyisjake 10 years ago.
Keep the first parameter without a default.

Download all attachments as: .zip

Change History (10)

#1 @slaFFik
10 years ago

  • Component changed from Core to Warnings/Notices

@imath
10 years ago

#2 @imath
10 years ago

  • Keywords has-patch reporter-feedback added

hi slaFFik,

Could you test 5933.patch to see if it solves the warnings ?

#3 @slaFFik
10 years ago

Tested, no more such warnings, turbo @image.

#4 @imath
10 years ago

  • Keywords reporter-feedback removed
  • Milestone changed from Awaiting Review to 2.2

#5 @DJPaul
10 years ago

A filter callback function requires at least one parameter, so I don't see why the first parameter needs to be optional.

@whyisjake
10 years ago

Keep the first parameter without a default.

#6 @whyisjake
10 years ago

Here is another patch, with the first option staying the same.

#7 @djpaul
10 years ago

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

In 9108:

Core: Page title: make the 2nd/3rd params for bp_modify_page_title optional and provide defaults.

Prevents PHP Warnings caused by other plugins/themes.

Fixes #5933, props imath and whyisjake.

#8 @DJPaul
8 years ago

  • Component changed from Tools - Warnings/Notices to Core
Note: See TracTickets for help on using tickets.