PHP Warning: Use of undefined constant IN_serendipity_admin

Found a bug? Tell us!!
Post Reply
hanno
Regular
Posts: 66
Joined: Fri May 20, 2005 8:04 am
Contact:

PHP Warning: Use of undefined constant IN_serendipity_admin

Post by hanno » Fri Dec 01, 2017 1:03 am

I'm getting warnings in my PHP log when using PHP 7.2:

[30-Nov-2017 23:57:01 Europe/Berlin] PHP Warning: Use of undefined constant IN_serendipity_admin - assumed 'IN_serendipity_admin' (this will throw an Error in a future version of PHP) in [path]/include/functions_smarty.inc.php on line 1005
[30-Nov-2017 23:57:01 Europe/Berlin] PHP Warning: Use of undefined constant IN_serendipity_admin - assumed 'IN_serendipity_admin' (this will throw an Error in a future version of PHP) in [path]/include/functions_smarty.inc.php on line 1022

I'm not entirely clear what that means, it seems to think the single quotes are part of the constant name.

User avatar
garvinhicking
Core Developer
Posts: 30009
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Post by garvinhicking » Wed Jan 10, 2018 12:22 pm

Thanks & sorry for late response. A "defined('IN_serendipity_admin')" check is needed for forward compatibility. I just committed it to our 2.1 branch and master.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

elguenny
Posts: 4
Joined: Mon Feb 15, 2016 8:26 pm

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Post by elguenny » Sat Feb 24, 2018 10:15 pm

FYI, if I switch to PHP 7.2.1 I get another warning in serendipity_config.inc.php. PHP 7.1.x is working fine without warnings.

Code: Select all

Use of undefined constant CHARSET_NATIVE - assumed 'CHARSET_NATIVE' (this will throw an Error in a future version of PHP) in /home/www/blog/serendipity_config.inc.php on line 183

User avatar
garvinhicking
Core Developer
Posts: 30009
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Post by garvinhicking » Mon Mar 12, 2018 1:39 pm

Hey,
many thanks for reporting. This was another instance of using an uninitialized constant, I've fixed this in our git 2.1 & master.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

hanno
Regular
Posts: 66
Joined: Fri May 20, 2005 8:04 am
Contact:

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Post by hanno » Mon Mar 26, 2018 10:01 pm

More such warnings as part of the "podcast" plugin:

[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_QTEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_QTEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1215
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_WMEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_WMEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1216
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_MFEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_MFEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1217
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_AUEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_AUEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1218
[26-Mar-2018 22:00:08 Europe/Berlin] PHP Warning: Use of undefined constant PLUGIN_PODCAST_XSPFEXT_DDEFAULT - assumed 'PLUGIN_PODCAST_XSPFEXT_DDEFAULT' (this will throw an Error in a future version of PHP) in /home/hanno/websites/blog.hboeck.de/htdocs/plugins/serendipity_event_podcast/serendipity_event_podcast.php on line 1219

User avatar
garvinhicking
Core Developer
Posts: 30009
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Post by garvinhicking » Mon May 14, 2018 2:46 pm

Thanks, fixed!
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

hanno
Regular
Posts: 66
Joined: Fri May 20, 2005 8:04 am
Contact:

Re: PHP Warning: Use of undefined constant IN_serendipity_admin

Post by hanno » Thu Jun 21, 2018 4:05 pm

One more such warning in the installer code:

Warning: Use of undefined constant S9Y_DB_INCLUDED - assumed 'S9Y_DB_INCLUDED' (this will throw an Error in a future version of PHP) in /[path]/include/functions_installer.inc.php on line 650

Post Reply