permalinks 1.17.1: PHP 8 compatibility fixes
* Update serendipity_event_custom_permalinks.php changes necessary to PHP8.2. there was an undeclared const variable. changed it to string-value * Update ChangeLog changed version to 1.17.1 and added information to changelog file * Update serendipity_event_custom_permalinks.php increased version
This commit is contained in:
parent
1f64f2e0c8
commit
7f49ccaffe
|
@ -1,3 +1,7 @@
|
|||
1.17.1: PHP8 threw an error because of an undeclared
|
||||
const variable "UNKNOWN". changed both
|
||||
appearances to the string value 'UNKNOWN'
|
||||
|
||||
1.17: Reset message for 404 error handling which is now
|
||||
overriden
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class serendipity_event_custom_permalinks extends serendipity_event
|
|||
'backend_display' => true));
|
||||
|
||||
$propbag->add('author', 'Garvin Hicking');
|
||||
$propbag->add('version', '1.17');
|
||||
$propbag->add('version', '1.17.1');
|
||||
$propbag->add('requirements', array(
|
||||
'serendipity' => '1.6',
|
||||
'smarty' => '2.6.7',
|
||||
|
@ -127,8 +127,8 @@ class serendipity_event_custom_permalinks extends serendipity_event
|
|||
case 'frontend_display:html:per_entry':
|
||||
// Reset message for 404 error handling which is now overriden
|
||||
$serendipity['content_message'] = '';
|
||||
|
||||
if (isset($this->ids[$eventData['id']]) && stristr($this->ids[$eventData['id']], '/' . UNKNOWN) === FALSE) {
|
||||
// 2023: PHP8 threw undefined constant error for UNKNOWN. put the word in inverted commas. Works with PHP8.2
|
||||
if (isset($this->ids[$eventData['id']]) && stristr($this->ids[$eventData['id']], '/' . 'UNKNOWN') === FALSE) {
|
||||
$eventData['link'] = $this->ids[$eventData['id']];
|
||||
$urldata = parse_url($serendipity['baseURL']);
|
||||
$eventData['rdf_ident'] = $urldata['scheme'] . '://' . $urldata['host'] . $this->ids[$eventData['id']];
|
||||
|
@ -168,7 +168,7 @@ meta_properties_permalink {
|
|||
|
||||
$title = $eventData['title'];
|
||||
if (empty($title)) {
|
||||
$title = UNKNOWN;
|
||||
$title = 'UNKNOWN'; // 2023: PHP8 threw undefined constant error. put the word in inverted commas
|
||||
}
|
||||
|
||||
if (empty($permalink)) {
|
||||
|
|
Loading…
Reference in a new issue