File Fix-dynamic-property-PHP-8.2.patch of Package phpldapadmin
From e9cc63ccdad4963f66b32c58ed6d3739967577cc Mon Sep 17 00:00:00 2001
From: William Desportes <williamdes@wdes.fr>
Date: Fri, 31 Mar 2023 14:04:06 +0200
Subject: [PATCH] Fix PHP 8.2 dynamic properties
Source: https://sources.debian.org/src/phpldapadmin/1.2.6.3-0.3/debian/patches/Fix-dynamic-property-PHP-8.2.patch/
---
lib/PLAAttribute.php | 1 +
lib/Query.php | 1 +
lib/Template.php | 1 +
lib/TemplateRender.php | 2 ++
lib/import_functions.php | 1 +
lib/page.php | 1 +
6 files changed, 7 insertions(+)
diff --git a/lib/PLAAttribute.php b/lib/PLAAttribute.php
index a2f0091c..dfcc8e60 100644
--- a/lib/PLAAttribute.php
+++ b/lib/PLAAttribute.php
@@ -12,6 +12,7 @@
* @package phpLDAPadmin
* @subpackage Templates
*/
+#[\AllowDynamicProperties]
class PLAAttribute {
# Attribute Name
public $name;
diff --git a/lib/Query.php b/lib/Query.php
index c79940fb..3348ad37 100644
--- a/lib/Query.php
+++ b/lib/Query.php
@@ -12,6 +12,7 @@
* @package phpLDAPadmin
* @subpackage Queries
*/
+#[\AllowDynamicProperties]
class Query extends xmlTemplate {
protected $description = '';
public $results = array();
diff --git a/lib/Template.php b/lib/Template.php
index 2e4978f1..5309193a 100644
--- a/lib/Template.php
+++ b/lib/Template.php
@@ -28,6 +28,7 @@
* @todo RDN attributes need to be checked that are included in the schema, otherwise mark it is invalid
* @todo askcontainer is no longer used?
*/
+#[\AllowDynamicProperties]
class Template extends xmlTemplate {
# If this template visible on the template choice list
private $visible = true;
diff --git a/lib/TemplateRender.php b/lib/TemplateRender.php
index b19d7640..d273e351 100644
--- a/lib/TemplateRender.php
+++ b/lib/TemplateRender.php
@@ -15,6 +15,8 @@
class TemplateRender extends PageRender {
# Page number
private $pagelast;
+ private $url_base;
+ private $layout;
/** CORE FUNCTIONS **/
diff --git a/lib/import_functions.php b/lib/import_functions.php
index 23a52f4e..2c831498 100644
--- a/lib/import_functions.php
+++ b/lib/import_functions.php
@@ -144,6 +144,7 @@ public function LDAPimport() {
* @package phpLDAPadmin
* @subpackage Import
*/
+#[\AllowDynamicProperties]
class ImportLDIF extends Import {
private $_currentLineNumber = 0;
private $_currentLine = '';
diff --git a/lib/page.php b/lib/page.php
index 43efc2a7..e8241a94 100644
--- a/lib/page.php
+++ b/lib/page.php
@@ -12,6 +12,7 @@
* @package phpLDAPadmin
* @subpackage Page
*/
+#[\AllowDynamicProperties]
class page {
# pre-HTML headers
protected $_pageheader;