Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated preg_match_all() in functions-view_template #7249

Open
andrewwerth opened this issue Jan 27, 2024 · 0 comments
Open

Deprecated preg_match_all() in functions-view_template #7249

andrewwerth opened this issue Jan 27, 2024 · 0 comments

Comments

@andrewwerth
Copy link

Description

On a single item custom post page, using pods shortcode [pods field="fieldname"] produces a warning in debug mode:

Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /var/www/html/wp-content/plugins/pods/components/Templates/includes/functions-view_template.php on line 723

Version

3.0.10

Testing Instructions

I don't have a way to provide step-by-step instructions to repeat this error. I have a page for displaying items of a custom post type created with Pods and there's a Template for that Single Item: PostTypeName. Within the template, there are two paragraph fields that use shortcodes to pull fields from the DB:
[pods field="fieldname1"] [pods field="fieldname2"] ...etc...

The information is displayed properly on the website, but with debug mode turned on the error messages appear. (Also note that in addition to the preg_match_all() deprecation message, there's also one for str_replace() on line 828 of functions-view_template.php, as shown in the screenshot.

Screenshots / Screencast

Screenshot 2024-01-26 194535

Possible Workaround

No response

Site Health Information

`
### wp-core ###

version: 6.4.2
site_language: en_US
user_language: en_US
timezone: America/New_York
permalink: /%postname%/
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: undefined
environment_type: production
user_count: 3
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /var/www/html
wordpress_size: 360.14 MB (377637089 bytes)
uploads_path: /var/www/html/wp-content/uploads
uploads_size: 290.58 MB (304693653 bytes)
themes_path: /var/www/html/wp-content/themes
themes_size: 3.21 MB (3367958 bytes)
plugins_path: /var/www/html/wp-content/plugins
plugins_size: 43.49 MB (45607254 bytes)
database_size: 5.75 MB (6029312 bytes)
total_size: 703.18 MB (737335266 bytes)

### wp-active-theme ###

name: Twenty Twenty-Four (twentytwentyfour)
version: 1.0
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
theme_path: /var/www/html/wp-content/themes/twentytwentyfour
auto_update: Disabled

### wp-plugins-active (7) ###

Advanced Query Loop: version: 2.1.0, author: Ryan Welcher, Auto-updates disabled
awe: version: 1.0.0, author: Andrew Werth, Auto-updates disabled
Content Blocks Builder: version: 2.4.13, author: CBB Team, Auto-updates disabled
MailerLite - Signup forms (official): version: 1.7.3, author: MailerLite, Auto-updates disabled
Pods - Custom Content Types and Fields: version: 3.0.10, author: Pods Framework Team, Auto-updates disabled
UpdraftPlus - Backup/Restore: version: 1.23.16, author: UpdraftPlus.Com, DavidAnderson, Auto-updates disabled
WordPress Importer: version: 0.8.2, author: wordpressdotorg, Auto-updates disabled

### wp-plugins-inactive (1) ###

Delete Expired Transients: version: 2.0.7, author: WebAware, Auto-updates disabled

### 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: 8M
upload_max_filesize: 2M
max_effective_size: 2 MB
max_file_uploads: 20
gd_version: 2.3.0
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: 9.55.0

### wp-server ###

server_architecture: Linux 5.15.0-92-generic x86_64
httpd_software: Apache/2.4.58 (Ubuntu)
php_version: 8.1.2-1ubuntu2.14 64bit
php_sapi: apache2handler
max_input_variables: 1000
time_limit: 30
memory_limit: 256M
max_input_time: 60
upload_max_filesize: 2M
php_post_max_size: 8M
curl_version: 7.81.0 OpenSSL/3.0.2
suhosin: false
imagick_availability: false
pretty_permalinks: true
htaccess_extra_rules: false
current: 2024-01-27T00:46:33+00:00
utc-time: Saturday, 27-Jan-24 00:46:33 UTC
server-time: 2024-01-26T19:46:31-05:00

### wp-database ###

extension: mysqli
server_version: 8.0.35-0ubuntu0.22.04.1
client_version: mysqlnd 8.1.2-1ubuntu2.14
max_allowed_packet: 67108864
max_connections: 151

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /var/www/html/wp-content
WP_PLUGIN_DIR: /var/www/html/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable

### pods ###

pods-server-software: Apache/2.4.58 (Ubuntu)
pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
pods-session-save-path: /var/lib/php/sessions
pods-session-save-path-exists: Yes
pods-session-save-path-writable: Yes
pods-session-max-lifetime: 1440
pods-opcode-cache-apc: No
pods-opcode-cache-memcached: No
pods-opcode-cache-opcache: Yes
pods-opcode-cache-redis: No
pods-object-cache-apc: No
pods-object-cache-apcu: No
pods-object-cache-memcache: No
pods-object-cache-memcached: No
pods-object-cache-redis: No
pods-memory-current-usage: 6.564M / 40M
pods-memory-current-usage-real: 8.000M
pods-network-wide: No
pods-install-location: /wp-content/plugins/pods/
pods-developer: No
pods-tableless-mode: No
pods-relationship-table-enabled: Yes
pods-relationship-table-status: 236
pods-light-mode: No
pods-strict: No
pods-allow-deprecated: Yes
pods-api-cache: Yes
pods-shortcode-allow-evaluate-tags: No
pods-sessions: Disable sessions
pods-can-use-sessions: Yes
pods-settings-types_only: No
pods-settings-watch_changed_fields: No
pods-settings-metadata_integration: Yes
pods-settings-metadata_override_get: No

`

Pods Package

No response

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

No branches or pull requests

1 participant