Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

CC plugin admin fails to load with PHP 8 #209

@xolotl

Description

@xolotl

Description

When moving to PHP 8.0.21, Creative Commons (CC) plugin admin settings fails to load with fatal error.

Reproduction

  1. Upgrade PHP in WordPress server environment from PHP 7.4.30 to PHP 8.0.21 (or perhaps any version of PHP 8).
  2. Try to load the CC plugin admin view /wp-admin/options-general.php?page=cc-admin
  3. See error (paths truncated so as not to show full server details): Fatal error: Uncaught ValueError: Unknown format specifier ";" in /wp-content/plugins/creative-commons/includes/class-creativecommons.php:927 Stack trace: #0 /wp-content/plugins/creative-commons/includes/class-creativecommons.php(927): printf('<img src="%1$s"...', 'http://localhos...') #1 /wp-includes/class-wp-hook.php(307): CreativeCommons->create_admin_page('') #2 /wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #3 /wp-includes/plugin.php(476): WP_Hook->do_action(Array) #4 /wp-admin/admin.php(259): do_action('settings_page_c...') #5 /wp-admin/options-general.php(10): require_once('...') #6 {main} thrown in /wp-content/plugins/creative-commons/includes/class-creativecommons.php on line 927

Expectation

CC plugin admin view will load when using PHP 8.

Screenshots

Expected CC plugin admin view

Settings admin for WordPress CC plugin

Server Environment

Server Environment where error is not generated

  • WordPress Version 6.0.1
  • Creative Commons plugin Version 2022.07.1
  • Linux 5.10.47-linuxkit x86_64
  • Apache/2.4.54 (Debian)
  • PHP 7.4.30 (Supports 64bit values)

Server Environment where error is generated

  • WordPress Version 6.0.1
  • Creative Commons plugin Version 2022.07.1
  • Linux 5.10.47-linuxkit x86_64
  • Apache/2.4.54 (Debian)
  • PHP 8.0.21 (Supports 64bit values)

Resolution

  • I would be interested in resolving this bug.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions