Skip to:
Content

BuddyPress.org

Opened 18 months ago

Last modified 18 months ago

#9005 new defect (bug)

PHP Warning: Undefined variable $max

Reported by: lenasterg's profile lenasterg Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Blogs Keywords: close
Cc:

Description

Hi.
I think the variable

$max

in
​https://buddypress.trac.wordpress.org/browser/trunk/src/bp-blogs/classes/class-bp-blogs-template.php#L169

should be changed to

$r['max']

The current variable '$max' produces a PHP Warning: Undefined variable $max

Thanks in advance
Lena

Change History (3)

#1 @imath
18 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 12.0.0

Thanks for your report @lenasterg : I agree 👌. I’ll take care of this asap.

#2 @imath
18 months ago

  • Keywords reporter-feedback added; needs-patch removed

Well it's actually defined at line 163: $max = (int) wp_unslash( $r['max'] );.

See ​https://buddypress.trac.wordpress.org/browser/trunk/src/bp-blogs/classes/class-bp-blogs-template.php#L163

Are you sure the notice error is about this file?

#3 @lenasterg
18 months ago

  • Keywords close added; reporter-feedback removed
  • Milestone 12.0.0 deleted

Hi.
Yes you are right.
It is fixed in the /trunk version.
I have in my installation the 11.3.1 BuddyPress which had the bug.

So, false alarm :-)

Keep up the good work.
Bests,
Lena


Note: See TracTickets for help on using tickets.