Community Forums › Forums › Archived Forums › General Discussion › PHP 7.3 compatibility warnings for Genesis code
Tagged: deprecated functions, PHP warning
- This topic has 4 replies, 3 voices, and was last updated 4 years, 7 months ago by
LeviaDesign.
-
AuthorPosts
-
June 23, 2020 at 2:53 pm #499494
LeviaDesign
MemberHi,
I ran a PHP 7.3 compatibility test and found the below warnings for the Genesis code in the files 'genesis/lib/admin/menu.php' and 'genesis/lib/functions/layout.php':
FILE: /home/animalch/public_html/wp-content/themes/genesis/lib/functions/layout.php ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 614 | WARNING | Function name "__genesis_return_content_sidebar" is discouraged; PHP has reserved all method names with a double underscore prefix for future use. 629 | WARNING | Function name "__genesis_return_sidebar_content" is discouraged; PHP has reserved all method names with a double underscore prefix for future use. 644 | WARNING | Function name "__genesis_return_content_sidebar_sidebar" is discouraged; PHP has reserved all method names with a double underscore prefix for future use. 659 | WARNING | Function name "__genesis_return_sidebar_sidebar_content" is discouraged; PHP has reserved all method names with a double underscore prefix for future use. 674 | WARNING | Function name "__genesis_return_sidebar_content_sidebar" is discouraged; PHP has reserved all method names with a double underscore prefix for future use. 689 | WARNING | Function name "__genesis_return_full_width_content" is discouraged; PHP has reserved all method names with a double underscore prefix for future use. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /home/animalch/public_html/wp-content/themes/genesis/lib/admin/menu.php -------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------------- 150 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$admin_object_name} --------------------------------------------------------------------------------------------------------------------------
I wanted to know if the Genesis team is aware of these deprecated codes and if it is planning to update them.
Thanks for your help.
Rana
June 23, 2020 at 7:40 pm #499496AnitaC
KeymasterJune 24, 2020 at 5:50 am #499499Nick the Geek
MemberTo expand on this. Yes, we are aware of it. The code may be updated in Genesis core but it will likely not be removed or deprecated. Deprecating it just means throwing more errors.
However, this may be replaced without directly deprecating by adding new functions which are in turn invoked by the old functions. It does mean more code, but less than replacing with deprecation and it will result in fewer warnings.
Just wanted to add some detail here to make it clear that this is a complex issue and something being discussed to make sure it is handled in the best way possible.
July 1, 2020 at 6:45 am #499785LeviaDesign
MemberHi @Anita,
Thanks for your reply. The link you have provided to Github (https://github.com/studiopress/genesis/issues/2384) doesn't open for me.
July 1, 2020 at 6:46 am #499786LeviaDesign
MemberThanks for the clarification! @NicktheGeek
-
AuthorPosts
- The topic ‘PHP 7.3 compatibility warnings for Genesis code’ is closed to new replies.