WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Empty options created by plugin. #240

@peterwilsoncc

Description

@peterwilsoncc

Describe the bug

On the init hook the plugin creates three empty and unused options:

function add_options() {
add_option( 'maps_block_apple_team_id' );
add_option( 'maps_block_apple_key_id' );
add_option( 'maps_block_apple_private_key' );
}
add_action( 'init', __NAMESPACE__ . '\add_options' );

However, the options are stored in a single options maps_block_apple.

Steps to Reproduce

  1. In the database, delete all options beginning with maps_block_apple
  2. Go to the plugin options page
  3. Review the database, the three empty options will have been created
  4. Save the apple maps credentials
  5. The forth option maps_block_apple will have been created.
  6. The other three options will remain empty

Screenshots, screen recording, code snippet

Image

Environment information

  • WordPress 6.8.2-alpha-60224
  • Plugin develop @ 23ff657

WordPress information

Site Health
``` ` ### wp-core ###

version: 6.8.2-alpha-60224
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%year%/%monthnum%/%postname%/
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: local
user_count: 5
dotorg_communication: true

wp-paths-sizes

wordpress_path: /vagrant/wp-build
wordpress_size: 690.35 MB (723879706 bytes)
uploads_path: /vagrant/content/uploads
uploads_size: 18.46 MB (19356058 bytes)
themes_path: /vagrant/content/themes
themes_size: directory not found
plugins_path: /vagrant/content/plugins
plugins_size: 4.38 GB (4701026802 bytes)
fonts_path: /vagrant/content/uploads/fonts
fonts_size: directory not found
database_size: 2.63 MB (2752512 bytes)
total_size: 5.07 GB (5447015078 bytes)

wp-dropins (1)

db.php: true

wp-active-theme

name: Twenty Twenty-Five (twentytwentyfive)
version: 1.2
author: the WordPress team
author_website: https://wordpress.org
parent_theme: none
theme_features: core-block-patterns, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, widgets-block-editor, block-templates, post-formats, editor-style
theme_path: /vagrant/wp-build/wp-content/themes/twentytwentyfive

wp-themes-inactive (14)

Twenty Eleven: version: 4.9, author: the WordPress team
Twenty Fifteen: version: 4.0, author: the WordPress team
Twenty Fourteen: version: 4.2, author: the WordPress team
Twenty Nineteen: version: 3.1, author: the WordPress team
Twenty Seventeen: version: 3.9, author: the WordPress team
Twenty Sixteen: version: 3.5, author: the WordPress team
Twenty Ten: version: 4.4, author: the WordPress team
Twenty Thirteen: version: 4.4, author: the WordPress team
Twenty Twelve: version: 4.5, author: the WordPress team
Twenty Twenty: version: 2.9, author: the WordPress team
Twenty Twenty-Four: version: 1.3, author: the WordPress team
Twenty Twenty-One: version: 2.5, author: the WordPress team
Twenty Twenty-Three: version: 1.6, author: the WordPress team
Twenty Twenty-Two: version: 2.0, author: the WordPress team

wp-mu-plugins (1)

bypass-ssl-check.php: author: (undefined), version: (undefined)

wp-plugins-active (3)

Block for Apple Maps: version: 1.1.4, author: 10up
Simple Podcasting: version: 1.9.0, author: 10up
User Switching: version: 1.9.1, author: John Blackbourn (latest version: 1.9.2)

wp-plugins-inactive (15)

Ads.txt Manager: version: 1.4.4, author: 10up (latest version: 1.4.5)
Autopost for X (formerly Autoshare for Twitter): version: 2.3.0, author: 10up
Block Catalog: version: 1.6.2, author: 10up
Classic Editor: version: 1.6.7, author: WordPress Contributors
Eight Day Week: version: 1.2.5, author: 10up
Insecure Content Warning: version: 1.2.2, author: 10up
New Relic Reporting for WordPress: version: 1.3.3, author: 10up
Public Post Preview: version: 3.0.1, author: Dominik Schilling
Query Monitor: version: 3.17.2, author: John Blackbourn
Restricted Site Access: version: 7.5.2, author: 10up
Retro Winamp Block: version: 1.3.3, author: 10up
Safe Redirect Manager: version: 2.2.0, author: 10up (latest version: 2.2.2)
Safe SVG: version: 2.3.1, author: 10up
Simple Local Avatars: version: 2.8.3, author: 10up
Simple Page Ordering: version: 2.7.3, author: 10up

wp-media

image_editor: WP_Image_Editor_GD
imagick_module_version: Not available
imagemagick_version: Not available
imagick_version: Not available
file_uploads: 1
post_max_size: 1024M
upload_max_filesize: 1024M
max_effective_size: 1 GB
max_file_uploads: 20
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: not available

wp-server

server_architecture: Linux 5.15.0-92-generic aarch64
httpd_software: nginx/1.18.0
php_version: 8.2.27 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 900
memory_limit: 128M
admin_memory_limit: 256M
max_input_time: 900
upload_max_filesize: 1024M
php_post_max_size: 1024M
curl_version: 7.81.0 OpenSSL/3.0.2
suhosin: false
imagick_availability: false
pretty_permalinks: true
static_robotstxt_file: false
current: 2025-05-19T01:16:16+00:00
utc-time: Monday, 19-May-25 01:16:16 UTC
server-time: 2025-05-19T01:16:14+00:00

wp-database

extension: mysqli
server_version: 8.0.36-0ubuntu0.22.04.1
client_version: mysqlnd 8.2.27
max_allowed_packet: 16777216
max_connections: 151

wp-constants

WP_HOME: http://xu-osp-plugins.local
WP_SITEURL: http://xu-osp-plugins.local/wp
WP_CONTENT_DIR: /vagrant/content
WP_PLUGIN_DIR: /vagrant/content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: /vagrant/content/debug.log
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: local
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

wp-filesystem

wordpress: not writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
fonts: does not exist
mu-plugins: writable

</details></summary>

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Incoming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions