WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#32091 closed defect (bug) (invalid)

Fatal error: Cannot redeclare get_avatar_url() 3414

Reported by: thedanielthorne Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:
PR Number:

Description

The error reads: Fatal error: Cannot redeclare get_avatar_url() (previously declared in /home/wstaging/subdomains/tax/public_html/wp-includes/link-template.php:3414) in /home/wstaging/subdomains/tax/public_html/wp-content/themes/zeyn/lib/custom_functions.php on line 623

This occurred when I updated to the new version of wordpress, 4.2

There was no issue before this. I can't access the wp-admin page so can't downgrade wordpress to see if that fixes it

Change History (5)

#1 @netweb
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version 4.2 deleted

Hi, this will be an issue with either the zeyn theme your using or something you have added yourself in custom_functions.php.

I suggest you contact the theme author for support or the WordPress support forums https://wordpress.org/support/

#2 follow-up: @tw2113
5 years ago

To add some quick context to the issue. WordPress 4.2 added a new core function of the same name as the custom one found in the theme.

#3 @nicholas_io
5 years ago

That's why you should prefix your own functions and class.

#4 in reply to: ↑ 2 @netweb
5 years ago

Replying to tw2113:

To add some quick context to the issue. WordPress 4.2 added a new core function of the same name as the custom one found in the theme.

Thanks tw2113, full details here -> #21195

#5 @knutsp
5 years ago

WordPress adding a non-prefixed new function is not a defect? Shouldn't the this new function have been named wp_get_avatar_url?

Note: See TracTickets for help on using tickets.