Warning: Undefined property: stdClass::$post_type in ConditionCallbacks.php
-
Hi and thanks for your great plugin!
I encountered a PHP warning when using Popup Maker:
[30-Mar-2025 11:53:17 UTC] PHP Warning: Undefined property: stdClass::$post_type in /wp-content/plugins/popup-maker/classes/ConditionCallbacks.php on line 282It seems to happen in the
is_post_type()function:public static function is_post_type( $post_type ) {
global $post;
return is_object( $post ) && ( is_singular( $post_type ) || $post->post_type === $post_type );
}Just wanted to report it in case it helps. Thanks again for your work!
-
Thanks for reaching out. We’re glad you’re enjoying Popup Maker!
Could you share what specific action did you take before seeing the warning?
Could you also send us the full error log so we can take a proper look?
If it’s possible, please send us your site info as well. Go to Tools > Site Health > Info and copy your site info.
We look forward to your reply.
Hi and thank you for your quick reply!
The warning appears during normal page loads on the frontend, and sometimes also in the admin dashboard. I didn’t trigger any specific action — it just shows up in the logs repeatedly.
Here’s the specific error:
[30-Mar-2025 11:53:17 UTC] PHP Warning: Undefined property: stdClass::$post_type in /wp-content/plugins/popup-maker/classes/ConditionCallbacks.php on line 282
As requested, I’m attaching a cleaned-up version of the Site Health Info below.
` wp-core
version: 6.7.2
site_language: it_IT
user_language: it_IT
timezone: Europe/Rome
permalink: /%year%/%monthnum%/%day%/%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 7
dotorg_communication: true wp-paths-sizes
wordpress_path: /home//public_html wordpress_size: 718,42 MB (753313190 bytes) uploads_path: /home//public_html/wp-content/uploads
uploads_size: 617,81 MB (647821276 bytes)
themes_path: /home//public_html/wp-content/themes themes_size: 104,17 MB (109228448 bytes) plugins_path: /home//public_html/wp-content/plugins
plugins_size: 207,36 MB (217435847 bytes)
fonts_path: /home/***/public_html/wp-content/uploads/fonts
fonts_size: directory not found
database_size: 27,22 MB (28546285 bytes)
total_size: 1,64 GB (1756345046 bytes) wp-dropins (1)
maintenance.php: true wp-active-theme
name: Salient Child Theme (salient-child)
version: 1.0
author: ThemeNectar
author_website: https://themeforest.net/user/themenectar
parent_theme: Salient (salient)
theme_features: core-block-patterns, woocommerce, wc-product-gallery-lightbox, wc-product-gallery-zoom, wc-product-gallery-slider, widgets-block-editor, post-formats, post-thumbnails, title-tag, automatic-feed-links, editor-style, menus, gutenberg, widgets
theme_path: /home/***/public_html/wp-content/themes/salient-child wp-parent-theme
name: Salient (salient)
version: 16.1.3
author: ThemeNectar
author_website: https://themeforest.net/user/themenectar
theme_path: /home/***/public_html/wp-content/themes/salient wp-themes-inactive (2)
Twenty Twenty-Five: version: 1.1, author: il team di WordPress
Twenty Twenty-Four: version: 1.3, author: il team di WordPress wp-plugins-active (27)
Business Reviews Bundle: version: 1.9.33, author: RichPlugins [email protected] (latest version: 1.9.99)
Classic Editor: version: 1.6.7, author: WordPress Contributors
Companion Auto Update: version: 3.9.2, author: Papin Schipper
Contact Form 7: version: 6.0.5, author: Takayuki Miyoshi
Disable Comments: version: 2.4.7, author: WPDeveloper
Jetpack: version: 14.5, author: Automattic
Jetpack Boost: version: 3.13.0, author: Automattic - Jetpack Site Speed team
Joinchat: version: 5.0.17, author: Creame (latest version: 5.2.4)
LiteSpeed Cache: version: 7.0.1, author: LiteSpeed Technologies
Manage XML-RPC: version: 1.0.2, author: brainvireinfo
Popup Maker: version: 1.20.4, author: Popup Maker
Redirection: version: 5.5.2, author: John Godley
Salient Core: version: 2.0.6, author: ThemeNectar
Salient Home Slider: version: 1.4.1, author: ThemeNectar
Salient Nectar Slider: version: 1.7.5, author: ThemeNectar
Salient Portfolio: version: 1.7.5, author: ThemeNectar
Salient Shortcodes: version: 1.5.3, author: ThemeNectar
Salient Social: version: 1.2.4, author: ThemeNectar
Salient Widgets: version: 1.2, author: ThemeNectar
Salient WPBakery Page Builder: version: 7.1, author: Michael M - WPBakery.com | Modified by ThemeNectar
Say What?: version: 2.2.5, author: Ademti Software
UpdraftPlus - Backup/Restore: version: 1.25.3, author: TeamUpdraft, DavidAnderson
Web Application Firewall: version: 2.1.3, author: miniOrange
Wordfence Security: version: 8.0.5, author: Wordfence
WP-Sweep: version: 1.1.8, author: Lester 'GaMerZ' Chan
WPCode Lite: version: 2.2.7, author: WPCode
Yoast SEO: version: 24.8.1, author: Team Yoast wp-plugins-inactive (1)
Broken Link Checker: version: 2.4.2, author: WPMU DEV wp-media
image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1809
imagemagick_version: ImageMagick 7.1.1-43 Q16-HDRI x86_64 22550 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: 1
post_max_size: 32M
upload_max_filesize: 16M
max_effective_size: 16 MB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 500 GB
imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
imagick::RESOURCETYPE_FILE: 196608
imagick::RESOURCETYPE_MAP: 250 GB
imagick::RESOURCETYPE_MEMORY: 125 GB
imagick::RESOURCETYPE_THREAD: 1
imagick::RESOURCETYPE_TIME: 0
imagemagick_file_formats: 3FR, 3G2, 3GP, A, AAI, AI, APNG, ART, ARW, ASHLAR, AVCI, AVI, AVIF, AVS, B, BAYER, BAYERA, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, C, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUBE, CUR, CUT, DATA, DCM, DCR, DCRAW, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FARBFELD, FAX, FF, FFF, FILE, FITS, FL32, FLV, FRACTAL, FTP, FTS, FTXT, G, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HEIC, HEIF, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K, K25, KDC, LABEL, M, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MDC, MEF, MIFF, MKV, MNG, MONO, MOS, MOV, MP4, MPC, MPEG, MPG, MPO, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, O, ORA, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, QOI, R, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, RMF, RSVG, RW2, RWL, SCR, SCREENSHOT, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, SRW, STEGANO, STI, STRIMG, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, Y, YAML, YCBCR, YCBCRA, YUV
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: 9.27 wp-server
server_architecture: Linux 4.18.0-553.40.1.lve.el8.x86_64 x86_64
httpd_software: LiteSpeed
php_version: 8.3.19 64bit
php_sapi: litespeed
max_input_variables: 5000
time_limit: 300
memory_limit: 2G
max_input_time: 600
upload_max_filesize: 16M
php_post_max_size: 32M
curl_version: 8.12.1 OpenSSL/1.1.1w
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true
current: 2025-04-09T13:10:48+00:00
utc-time: Wednesday, 09-Apr-25 13:10:48 UTC
server-time: 2025-04-09T15:10:47+02:00 wp-database
extension: mysqli
server_version: 5.7.44-log-cll-lve
client_version: mysqlnd 8.3.19
max_allowed_packet: 67108864
max_connections: 200 wp-constants
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home//public_html/wp-content WP_PLUGIN_DIR: /home//public_html/wp-content/plugins
WP_MEMORY_LIMIT: 1024M
WP_MAX_MEMORY_LIMIT: 2G
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: true
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
fonts: not writable jetpack
site_id: 219804025
ssl_cert: No
time_diff: undefined
version_option: 14.5:1744185855
old_version: 14.4.1:1742569889
public: Public
master_user: #8 [email protected]
is_offline_mode: off
is_offline_mode_constant: off
current_user: #8 [email protected]
tokens_set: Blog User-
This reply was modified 1 year, 1 month ago by
NDV Comunicazione - Sviluppo.
Thanks for the response!
Could you send us a ticket as well via Support Request – Popup Maker?
We might need to take a closer look.
We’ll wait for your email! 🙏
Hi, I encountered the same problem after a native WP search with no results.
I’have fixed the warning with instanceof WP_Post instead of is_object().
If it helps to patch the plugin for a future version.
public static function is_post_type( $post_type ) {
global $post;
return $post instanceof WP_Post
&& ( is_singular( $post_type ) || $post->post_type === $post_type );
}-
This reply was modified 8 months, 2 weeks ago by
arnaudnumeria.
@arnaudnumeria
Yes, you’re right — usinginstanceof WP_Postis much better thanis_object(). Thanks for pointing it out! -
This reply was modified 1 year, 1 month ago by
The topic ‘Warning: Undefined property: stdClass::$post_type in ConditionCallbacks.php’ is closed to new replies.