Skip to content

Fix for php8#472

Merged
vovafeldman merged 1 commit into
Freemius:developfrom
alanef:fixphp8
Jan 27, 2021
Merged

Fix for php8#472
vovafeldman merged 1 commit into
Freemius:developfrom
alanef:fixphp8

Conversation

@alanef
Copy link
Copy Markdown
Contributor

@alanef alanef commented Jan 20, 2021

Unnecessary optional arg ( all calls provide a value) on private function _log line 145 of includes/class-fs-logger.php breaks PHP 8

Optional arg value of 'log' on private function _log not required and breaks PHP 8  as all calls provide a value
@vovafeldman vovafeldman merged commit 3b1dabc into Freemius:develop Jan 27, 2021
@vovafeldman
Copy link
Copy Markdown
Contributor

Thanks @alanef!

@oldrup
Copy link
Copy Markdown

oldrup commented Feb 2, 2021

Please forgive me if this belongs to another ticket, but in addition to the deprecation notice on line 145, I get thee "Cannot modify header information" warnings on my PHP 8.0.0 test bench, warnings that were not thrown running PHP 7.4.x

Complete output when activating plugin using Freemius under PHP 8.0.0:

Deprecated: Required parameter $wrapper follows optional parameter $type in /home/oldrupdk/oldrup.net/wp-content/plugins/content-aware-sidebars/lib/freemius/includes/class-fs-logger.php on line 145

Warning: Cannot modify header information - headers already sent by (output started at /home/oldrupdk/oldrup.net/wp-content/plugins/content-aware-sidebars/lib/freemius/includes/class-fs-logger.php:145) in /home/oldrupdk/oldrup.net/wp-includes/functions.php on line 6360

Warning: Cannot modify header information - headers already sent by (output started at /home/oldrupdk/oldrup.net/wp-content/plugins/content-aware-sidebars/lib/freemius/includes/class-fs-logger.php:145) in /home/oldrupdk/oldrup.net/wp-admin/includes/misc.php on line 1310

Warning: Cannot modify header information - headers already sent by (output started at /home/oldrupdk/oldrup.net/wp-content/plugins/content-aware-sidebars/lib/freemius/includes/class-fs-logger.php:145) in /home/oldrupdk/oldrup.net/wp-admin/admin-header.php on line 9

Best regards
Bjarne

@alanef
Copy link
Copy Markdown
Contributor Author

alanef commented Feb 2, 2021

The warnings as far as I can see are directly related to the preceding Deprecated notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants