From 764ca1f09806e09dc6cebe47b7cc98b18c6e0720 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Thu, 5 Jan 2023 11:32:39 +0900 Subject: [PATCH] fix Generate\Form test with missing session init --- .phan/config.php | 1 + www/admin/class_test.output.form.php | 4 ++++ www/admin/class_test.php | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.phan/config.php b/.phan/config.php index 36605743..0f1150b3 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -26,6 +26,7 @@ use Phan\Config; return [ + // "target_php_version" => "8.2", // turn color on (-C) "color_issue_messages_if_supported" => true, // If true, missing properties will be created when diff --git a/www/admin/class_test.output.form.php b/www/admin/class_test.output.form.php index 27f314d6..c91fe7b3 100644 --- a/www/admin/class_test.output.form.php +++ b/www/admin/class_test.output.form.php @@ -27,6 +27,10 @@ $ECHO_ALL = true; $LOG_FILE_ID = 'classTest-form'; ob_end_flush(); +// start session, needed for Form\Generate +$SET_SESSION_NAME = EDIT_SESSION_NAME; +$session = new CoreLibs\Create\Session($SET_SESSION_NAME); + // define an array for page use $table_arrays = []; $table_arrays[\CoreLibs\Get\System::getPageName(1)] = [ diff --git a/www/admin/class_test.php b/www/admin/class_test.php index 5fbc9129..bb17fbd6 100644 --- a/www/admin/class_test.php +++ b/www/admin/class_test.php @@ -54,7 +54,7 @@ print "TEST CLASS"; print ""; print '
Class Test: DB
'; -print '
Class Test: DB dbReturn
'; +print '
Class Test: DB dbReturn
'; print '
Class Test: COLORS
'; print '
Class Test: MIME
'; print '
Class Test: JSON
'; @@ -84,6 +84,7 @@ print '
Class Test: OUTPUT FORMClass Test: BACKEND ADMIN CLASS
'; print '
Class Test: LANG/L10n
'; print '
Class Test: SESSION
'; +print '
Class Test: SESSION: READ
'; print '
Class Test: SMARTY
'; print '
Class Test: LOGIN
'; print '
Class Test: AUTOLOADER
';