Page 1 of 1

PHP Warning: Use of undefined constant IN_serendipity_admin

Posted: Fri Dec 01, 2017 12:03 am
by hanno
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.

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Posted: Wed Jan 10, 2018 11:22 am
by garvinhicking
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.

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Posted: Sat Feb 24, 2018 9:15 pm
by elguenny
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

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Posted: Mon Mar 12, 2018 12:39 pm
by garvinhicking
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

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Posted: Mon Mar 26, 2018 10:01 pm
by hanno
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

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Posted: Mon May 14, 2018 2:46 pm
by garvinhicking
Thanks, fixed!

Re: PHP Warning: Use of undefined constant IN_serendipity_admin

Posted: Thu Jun 21, 2018 4:05 pm
by hanno
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

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Posted: Fri Jan 11, 2019 1:21 pm
by orang
garvinhicking wrote: Mon May 14, 2018 2:46 pm Thanks, fixed!
Hi Garvin,

I get the same problem, but I'm not sure I get what I have to do to fix it. Could you explain that? Do I have to update/install something?


Thanks,
Stefan

Re: PHP Warning: Use of undefined constant IN_serendipity_a

Posted: Sat Jan 12, 2019 1:48 am
by thh
orang wrote: Fri Jan 11, 2019 1:21 pm
garvinhicking wrote: Mon May 14, 2018 2:46 pm Thanks, fixed!
I get the same problem
Which one? :)
orang wrote: Fri Jan 11, 2019 1:21 pmbut I'm not sure I get what I have to do to fix it. Could you explain that? Do I have to update/install something?
It's fixed in the git repository, but not yet released.

You can
- look up the fixes in our code repository and adopt them in your version of s9y
- check out the version from git and update to that
- wait for the release

In general, s9y is not yet ready for prime time on PHP 7.2; you should run it with 7.1 or even 7.0, if possible.