From 7376fccf4abd5b11ede2c13baa032b72778ff3b3 Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Sat, 30 Dec 2023 19:20:28 +0100 Subject: [PATCH 01/14] Eliminate deprecation warning about dynamic properties introduced in php 8.2 --- lib/JSON/JSON.php | 4 ++ lib/bbcode/stringparser_bbcode.class.php | 10 ++++ lib/pear/HTMLSax3.php | 4 ++ lib/smarty/Smarty_Compiler.class.php | 8 +++ lib/tools/phpunit/CodeAuditTestCase.class | 3 + lib/tools/phpunit/GalleryTestCase.class | 56 +++++++++++++++++++ lib/tools/phpunit/MockObject.class | 4 ++ lib/tools/phpunit/MockTemplateAdapter.class | 6 ++ lib/tools/phpunit/UnitTestStorage.class | 4 ++ lib/tools/phpunit/phpunit.inc | 3 + .../phpunit/RepositoryDescriptorTest.class | 12 ++++ .../test/phpunit/RepositoryPackageTest.class | 4 ++ .../phpunit/ArchiveExtractToolkitTest.class | 3 + .../test/phpunit/CaptchaHelperTest.class | 3 + .../phpunit/CaptchaValidationPluginTest.class | 5 ++ .../phpunit/AddToCartControllerTest.class | 3 + .../cart/test/phpunit/CartHelperTest.class | 3 + .../phpunit/ModifyCartControllerTest.class | 3 + .../cart/test/phpunit/ViewCartViewTest.class | 5 ++ .../phpunit/AddCommentControllerTest.class | 4 ++ .../comment/test/phpunit/AkismetApiTest.class | 3 + .../test/phpunit/CommentSearchTest.class | 3 + .../CommentSiteAdminControllerTest.class | 3 + .../phpunit/EditCommentControllerTest.class | 5 ++ .../phpunit/ShowAllCommentsViewTest.class | 3 + modules/core/AdminMaintenance.inc | 3 + modules/core/AdminRepository.inc | 3 + modules/core/Callbacks.inc | 3 + modules/core/ItemAdd.inc | 10 ++++ modules/core/classes/Gallery.class | 3 + .../core/classes/GalleryDynamicAlbum.class | 3 + modules/core/classes/GalleryPlatform.class | 5 ++ .../GalleryPlatform/UnixPlatform.class | 4 ++ .../core/classes/GalleryRepositoryIndex.class | 3 + modules/core/classes/GallerySmarty.class | 3 + modules/core/classes/GalleryStatus.class | 2 + .../GalleryDatabaseImport.class | 9 +++ .../GalleryStorage/GalleryStorageExtras.class | 3 + .../GalleryStorage/PostgreSqlStorage.class | 3 + modules/core/classes/GalleryUnknownItem.class | 3 + .../core/classes/GalleryUrlGenerator.class | 10 ++++ modules/core/module.inc | 3 + .../phpunit/AdminCoreControllerTest.class | 6 ++ .../AdminDeleteUserControllerTest.class | 3 + .../AdminEditGroupUsersControllerTest.class | 3 + .../AdminLanguageManagerControllerTest.class | 4 ++ .../AdminMaintenanceControllerModeTest.class | 5 ++ ...toryDownloadAndInstallControllerTest.class | 6 ++ ...dminRepositoryDownloadControllerTest.class | 3 + .../phpunit/AdminThemesControllerTest.class | 6 ++ modules/core/test/phpunit/AlbumTest.class | 4 +- .../phpunit/BuildDerivativesTaskTest.class | 4 ++ modules/core/test/phpunit/CharsetTest.class | 4 ++ modules/core/test/phpunit/ChildTest.class | 3 + modules/core/test/phpunit/CodeAuditTest.class | 12 ++++ .../core/test/phpunit/ControllerTest.class | 3 + .../core/test/phpunit/CoreSearchTest.class | 3 + .../phpunit/CreateThumbnailOptionTest.class | 3 + modules/core/test/phpunit/DataCacheTest.class | 4 ++ .../test/phpunit/DatabaseExportTest.class | 3 + .../test/phpunit/DatabaseImportTest.class | 4 ++ .../test/phpunit/DatabaseStorageTest.class | 3 + .../test/phpunit/DeleteSessionsTaskTest.class | 3 + modules/core/test/phpunit/EmbedTest.class | 3 + .../test/phpunit/EventLogHelperTest.class | 3 + modules/core/test/phpunit/EventTest.class | 3 + .../core/test/phpunit/FastDownloadTest.class | 9 +++ .../core/test/phpunit/FileSystemTest.class | 6 ++ .../phpunit/FlushDatabaseCacheTaskTest.class | 3 + .../test/phpunit/FlushTemplatesTaskTest.class | 3 + .../test/phpunit/ItemAddControllerTest.class | 6 ++ .../test/phpunit/ItemAddFromBrowserTest.class | 5 ++ .../test/phpunit/ItemAttributesTest.class | 10 ++++ .../phpunit/ItemEditAlbumPluginTest.class | 3 + .../test/phpunit/ItemEditItemPluginTest.class | 3 + .../phpunit/ItemEditMoviePluginTest.class | 3 + .../phpunit/ItemEditPhotoPluginTest.class | 4 ++ .../ItemEditPhotoThumbnailPluginTest.class | 3 + ...temEditRotateAndScalePhotoPluginTest.class | 4 ++ .../phpunit/ItemEditThemePluginTest.class | 8 +++ .../ItemMakeHighlightControllerTest.class | 3 + .../ItemMoveSingleControllerTest.class | 5 ++ modules/core/test/phpunit/ItemOrderTest.class | 4 ++ .../ItemPermissionsControllerTest.class | 5 ++ modules/core/test/phpunit/ItemTest.class | 3 + modules/core/test/phpunit/LanguageTest.class | 3 + .../test/phpunit/LocalizationAuditTest.class | 5 ++ modules/core/test/phpunit/LockTest.class | 3 + .../test/phpunit/LogoutControllerTest.class | 3 + .../core/test/phpunit/MailHelperTest.class | 9 +++ modules/core/test/phpunit/MarkupTest.class | 5 ++ modules/core/test/phpunit/ModuleTest.class | 8 +++ modules/core/test/phpunit/MovieTest.class | 3 + .../phpunit/OptimizeDatabaseTaskTest.class | 3 + .../test/phpunit/Php43CompatibilityTest.class | 6 ++ .../core/test/phpunit/PhpDocAuditTest.class | 5 ++ modules/core/test/phpunit/PlatformTest.class | 50 +++++++++++------ .../test/phpunit/PluginCallbackTest.class | 13 +++++ modules/core/test/phpunit/PluginTest.class | 5 ++ .../RepositoryDownloadPackagesTest.class | 6 ++ .../phpunit/RepositoryUtilitiesTest.class | 6 ++ modules/core/test/phpunit/SessionTest.class | 25 +++++++++ .../test/phpunit/SimpleCallbackTest.class | 6 ++ modules/core/test/phpunit/StorageTest.class | 11 ++++ modules/core/test/phpunit/SvnAuditTest.class | 10 +++- .../test/phpunit/TemplateAdapterTest.class | 8 +++ .../core/test/phpunit/TemplateAuditTest.class | 13 +++++ modules/core/test/phpunit/TemplateTest.class | 13 +++++ modules/core/test/phpunit/ThemeTest.class | 9 +++ .../core/test/phpunit/UrlGeneratorTest.class | 3 + .../core/test/phpunit/UserHelperTest.class | 11 ++++ .../phpunit/UserLoginControllerTest.class | 19 +++++++ .../UserPreferencesControllerTest.class | 3 + ...erRecoverPasswordAdminControllerTest.class | 8 +++ ...RecoverPasswordConfirmControllerTest.class | 3 + .../UserRecoverPasswordControllerTest.class | 13 +++++ modules/core/test/phpunit/UtilitiesTest.class | 9 +++ modules/core/test/phpunit/ViewTest.class | 6 ++ modules/core/test/phpunit/WebTest.class | 8 +++ modules/dynamicalbum/UpdatesAlbum.inc | 7 +++ .../DynamicAlbumSiteAdminControllerTest.class | 3 + .../test/phpunit/DynamicAlbumTest.class | 6 ++ .../exif/test/phpunit/ExifExtractorTest.class | 4 ++ .../exif/test/phpunit/ExifHelperTest.class | 3 + .../phpunit/AdminFfmpegControllerTest.class | 5 ++ .../test/phpunit/FfmpegToolkitTest.class | 7 +++ modules/gd/test/phpunit/GdToolkitTest.class | 3 + .../gd/test/phpunit/TestGdFunctionality.class | 3 + modules/icons/test/phpunit/IconsTest.class | 4 ++ .../AdminImageMagickControllerTest.class | 53 ++++++++++-------- .../test/phpunit/ImageMagickToolkitTest.class | 9 +++ modules/itemadd/ItemAddFromServer.inc | 15 +++++ .../test/phpunit/ItemAddFromServerTest.class | 15 +++++ .../test/phpunit/ItemAddFromWebTest.class | 14 +++++ .../ItemAddSiteAdminControllerTest.class | 3 + .../test/phpunit/JpegtranToolkitTest.class | 11 ++++ .../phpunit/KeywordAlbumCallbacksTest.class | 7 +++ .../KeywordAlbumSiteAdminControllerTest.class | 3 + .../test/phpunit/ItemAddLinkItemTest.class | 4 ++ .../test/phpunit/LinkItemOptionTest.class | 3 + .../linkitem/test/phpunit/LinkItemTest.class | 4 ++ .../phpunit/AdminNetPbmControllerTest.class | 3 + .../test/phpunit/NetPbmToolkitTest.class | 10 ++++ .../NewItemsSiteAdminControllerTest.class | 3 + .../test/phpunit/RatingCallbacksTest.class | 3 + .../test/phpunit/RatingHelperTest.class | 3 + .../test/phpunit/RatingOptionTest.class | 3 + .../RearrangeItemsControllerTest.class | 3 + modules/register/UserSelfRegistration.inc | 3 + .../AdminSelfRegistrationControllerTest.class | 3 + .../UserSelfRegistrationControllerTest.class | 14 ++++- .../rewrite/classes/RewriteUrlGenerator.class | 3 + .../IsapiRewriteUrlGenerator.class | 2 + .../pathinfo/PathInfoUrlGenerator.class | 3 + .../phpunit/AdminRewriteControllerTest.class | 3 + .../test/phpunit/IsapiRewriteHelperTest.class | 7 +++ .../test/phpunit/IsapiRewriteParserTest.class | 5 ++ .../IsapiRewriteUrlGeneratorTest.class | 10 ++++ .../test/phpunit/ModRewriteHelperTest.class | 8 +++ .../test/phpunit/ModRewriteParserTest.class | 6 ++ .../phpunit/ModRewriteUrlGeneratorTest.class | 11 ++++ .../test/phpunit/PathInfoParserTest.class | 4 ++ .../phpunit/PathInfoUrlGeneratorTest.class | 11 ++++ .../rewrite/test/phpunit/RewriteApiTest.class | 3 + .../test/phpunit/RewriteHelperTest.class | 6 ++ .../test/phpunit/RewriteModuleTest.class | 3 + .../test/phpunit/RewriteParserTestCase.class | 4 ++ .../test/phpunit/SitemapViewTest.class | 10 ++++ modules/slideshow/AdminSlideshow.inc | 3 + .../phpunit/CustomThumbnailOptionTest.class | 3 + .../test/phpunit/ThumbnailImageTest.class | 4 ++ .../test/phpunit/ThumbnailToolkitTest.class | 3 + .../ThumbOffsetItemEditPluginTest.class | 3 + .../phpunit/ThumbPageItemEditPluginTest.class | 3 + .../phpunit/UserAlbumControllerTest.class | 5 ++ .../test/phpunit/UserAlbumTest.class | 3 + .../phpunit/ItemEditWatermarkPluginTest.class | 10 ++++ .../UserWatermarkEditControllerTest.class | 3 + .../UserWatermarksControllerTest.class | 3 + .../test/phpunit/WatermarkOptionTest.class | 6 ++ .../WatermarkSiteAdminControllerTest.class | 6 ++ 181 files changed, 1081 insertions(+), 43 deletions(-) diff --git a/lib/JSON/JSON.php b/lib/JSON/JSON.php index 163eda04..e205acd2 100644 --- a/lib/JSON/JSON.php +++ b/lib/JSON/JSON.php @@ -139,6 +139,10 @@ class Services_JSON * strings or numbers, if you return an object, make sure it does * not have a toJSON method, otherwise an error will occur. */ + + /* deprecated dynamic properties in php 8.2 */ + var $use; + function __construct($use = 0) { $this->use = $use; diff --git a/lib/bbcode/stringparser_bbcode.class.php b/lib/bbcode/stringparser_bbcode.class.php index 87f825c4..3318f0e0 100644 --- a/lib/bbcode/stringparser_bbcode.class.php +++ b/lib/bbcode/stringparser_bbcode.class.php @@ -146,6 +146,13 @@ class StringParser_BBCode extends StringParser { * @var bool */ var $_validateAgain = false; + + /* deprecated dynamic properties in php 8.2 */ + var $_output; + var $_savedName; + var $_savedCloseCount; + var $_savedValue; + var $_quoting; /** * Add a code @@ -1522,6 +1529,9 @@ class StringParser_BBCode_Node_Element extends StringParser_Node { * @var bool */ var $_paragraphHandled = false; + + /* deprecated dynamic properties in php 8.2 */ + var $_codeInfo; ////////////////////////////////////////////////// diff --git a/lib/pear/HTMLSax3.php b/lib/pear/HTMLSax3.php index 9ed1f2e0..1089df7a 100644 --- a/lib/pear/HTMLSax3.php +++ b/lib/pear/HTMLSax3.php @@ -826,6 +826,10 @@ class XML_HTMLSax3_OpeningTagState { * @access protected * @see XML_HTMLSax3_AttributeStartState */ + + /* deprecated dynamic properties in php 8.2 */ + private array $attrs; + function parseAttributes(&$context) { $Attributes = array(); diff --git a/lib/smarty/Smarty_Compiler.class.php b/lib/smarty/Smarty_Compiler.class.php index 71c6dd22..258caab4 100644 --- a/lib/smarty/Smarty_Compiler.class.php +++ b/lib/smarty/Smarty_Compiler.class.php @@ -73,6 +73,14 @@ class Smarty_Compiler extends Smarty { var $_strip_depth = 0; var $_additional_newline = "\n"; + /* deprecated dynamic properties in php 8.2 */ + var $_dvar_math_regexp; + var $_dvar_math_var_regexp; + var $_obj_restricted_param_regexp; + var $_obj_single_param_regexp; + var $_param_regexp; + var $_plugins_code; + /**#@-*/ /** * The class constructor. diff --git a/lib/tools/phpunit/CodeAuditTestCase.class b/lib/tools/phpunit/CodeAuditTestCase.class index 20d39fcf..df212e2b 100644 --- a/lib/tools/phpunit/CodeAuditTestCase.class +++ b/lib/tools/phpunit/CodeAuditTestCase.class @@ -26,6 +26,9 @@ * @version $Revision: 17580 $ */ class CodeAuditTestCase extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_checkTime; + public function __construct($methodName) { parent::__construct($methodName); diff --git a/lib/tools/phpunit/GalleryTestCase.class b/lib/tools/phpunit/GalleryTestCase.class index 56f1a925..b25795ad 100644 --- a/lib/tools/phpunit/GalleryTestCase.class +++ b/lib/tools/phpunit/GalleryTestCase.class @@ -27,6 +27,58 @@ class GalleryTestCase extends TestCase { public $_cleanup; + /* deprecated dynamic properties in php 8.2 */ + protected $_activeUserBackup; + protected $_album; + protected $_albums; + protected $_callback; + protected $_callbacks; + protected $_child; + protected $_comment; + protected $_derivative; + protected $_entity; + protected $_item; + protected $_items; + protected $_languageCode; + protected $_mockSession; + protected $_module; + protected $_noErrors; + protected $_noWarnings; + protected $_origSession; + protected $_originalSession; + protected $_parentAlbum; + protected $_parser; + protected $_phpVm; + protected $_platform; + protected $_preferred; + protected $_randomKey; + protected $_root; + protected $_rootAlbumId; + protected $_savePlatform; + protected $_saveSID; + protected $_saveSession; + protected $_saveUser; + protected $_saveVars; + protected $_savedSession; + protected $_saveSessionPerms; + protected $_session; + protected $_siteAdminGroupId; + protected $_smarty; + protected $_storage; + protected $_targetAlbum; + protected $_task; + protected $_template; + protected $_testRepository; + protected $_testStorage; + protected $_toolkit; + protected $_urlGenerator; + protected $_user; + protected $_user1; + protected $_user2; + protected $_userId; + protected $_view; + protected $_watermark; + public function __construct($methodName) { parent::__construct($methodName); @@ -1506,6 +1558,10 @@ class GalleryTestCase extends TestCase { * Extends GalleryEventListener */ class EntityCounterEventListener { + /* deprecated dynamic properties in php 8.2 */ + public $_count; + public $_ids; + public function __construct() { $this->_count = 0; $this->_ids = array(); diff --git a/lib/tools/phpunit/MockObject.class b/lib/tools/phpunit/MockObject.class index e5daf324..a22507a8 100644 --- a/lib/tools/phpunit/MockObject.class +++ b/lib/tools/phpunit/MockObject.class @@ -38,6 +38,10 @@ * @version $Revision: 17580 $ */ class MockObject { + /* deprecated dynamic properties in php 8.2 */ + public $_called; + public $_className; + public function __construct() { $this->_className = get_class($this); $_GET[$this->_className] = array( diff --git a/lib/tools/phpunit/MockTemplateAdapter.class b/lib/tools/phpunit/MockTemplateAdapter.class index 4fc2c3b0..3252aa0b 100644 --- a/lib/tools/phpunit/MockTemplateAdapter.class +++ b/lib/tools/phpunit/MockTemplateAdapter.class @@ -23,6 +23,12 @@ * @subpackage PHPUnit */ class MockTemplateAdapter { + /* deprecated dynamic properties in php 8.2 */ + public $_useProgressBar; + public $_callbacks; + public $_completeProgressBar; + public $_progress; + public function __construct($useProgressBar = true) { $this->_useProgressBar = $useProgressBar; $this->_callbacks = array(); diff --git a/lib/tools/phpunit/UnitTestStorage.class b/lib/tools/phpunit/UnitTestStorage.class index 4485f7c5..4007b03b 100644 --- a/lib/tools/phpunit/UnitTestStorage.class +++ b/lib/tools/phpunit/UnitTestStorage.class @@ -50,6 +50,10 @@ class UnitTestStorage extends MockObject { public $_extras; public $_lockSystem; + /* deprecated dynamic properties in php 8.2 */ + public $_tablePrefix; + public $_columnPrefix; + public function __construct() { parent::__construct(); diff --git a/lib/tools/phpunit/phpunit.inc b/lib/tools/phpunit/phpunit.inc index 2d2c7896..f91d123d 100644 --- a/lib/tools/phpunit/phpunit.inc +++ b/lib/tools/phpunit/phpunit.inc @@ -1016,6 +1016,9 @@ class TestSuite { public $fClassname; public $fModuleId; + /* deprecated dynamic properties in php 8.2 */ + public $fFilter; + public function __construct($classname = false, $moduleid = false, $filter = null) { // Find all methods of the given class whose name starts with // "test" and add them to the test suite. diff --git a/lib/tools/repository/test/phpunit/RepositoryDescriptorTest.class b/lib/tools/repository/test/phpunit/RepositoryDescriptorTest.class index b9eebb20..8ca10b6e 100644 --- a/lib/tools/repository/test/phpunit/RepositoryDescriptorTest.class +++ b/lib/tools/repository/test/phpunit/RepositoryDescriptorTest.class @@ -38,6 +38,9 @@ GalleryCoreApi::requireOnce( class RepositoryDescriptorTest extends GalleryTestCase { public $_testModule; + /* deprecated dynamic properties in php 8.2 */ + public $_canonicalFileMetaData; + public function setUp($x1 = null) { $ret = parent::setUp($x1); @@ -548,6 +551,9 @@ class RepositoryDescriptorTest extends GalleryTestCase { } class RepositoryDescriptorTestPhpVm extends GalleryPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_crc32; + public function setCrc32($contents, $crc32) { $this->_crc32[$contents] = $crc32; } @@ -558,6 +564,9 @@ class RepositoryDescriptorTestPhpVm extends GalleryPhpVm { } class RepositoryDescriptor_FakeFileMetaDataTest extends RepositoryDescriptor { + /* deprecated dynamic properties in php 8.2 */ + public $_metaData; + public function __construct($metaData) { $this->_metaData = $metaData; } @@ -639,6 +648,9 @@ class RepositoryDescriptorTestTranslator { } class RepositoryDescriptorTestUtilities { + /* deprecated dynamic properties in php 8.2 */ + public $_matches; + public function setGetFileRevision($expected, $reply) { $this->_matches[$expected] = $reply; } diff --git a/lib/tools/repository/test/phpunit/RepositoryPackageTest.class b/lib/tools/repository/test/phpunit/RepositoryPackageTest.class index 0605f6e3..f082fa2d 100644 --- a/lib/tools/repository/test/phpunit/RepositoryPackageTest.class +++ b/lib/tools/repository/test/phpunit/RepositoryPackageTest.class @@ -291,6 +291,10 @@ class RepositoryPackageTestDescriptor { public $_pluginDir; public $_pluginVersion; + /* deprecated dynamic properties in php 8.2 */ + public $_pluginBuildTimestamp; + public $_pluginStringsRevision; + public function __construct() { $this->_packages = array('package1', 'package2'); $this->_directories = array( diff --git a/modules/archiveupload/test/phpunit/ArchiveExtractToolkitTest.class b/modules/archiveupload/test/phpunit/ArchiveExtractToolkitTest.class index 5bf3d266..d2dd4dd6 100644 --- a/modules/archiveupload/test/phpunit/ArchiveExtractToolkitTest.class +++ b/modules/archiveupload/test/phpunit/ArchiveExtractToolkitTest.class @@ -28,6 +28,9 @@ GalleryCoreApi::requireOnce('modules/archiveupload/classes/ArchiveExtractToolkit * @version $Revision: 17999 $ */ class ArchiveExtractToolkitTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_unzipPath; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/captcha/test/phpunit/CaptchaHelperTest.class b/modules/captcha/test/phpunit/CaptchaHelperTest.class index 48e6bdc3..1d55d827 100644 --- a/modules/captcha/test/phpunit/CaptchaHelperTest.class +++ b/modules/captcha/test/phpunit/CaptchaHelperTest.class @@ -121,6 +121,9 @@ class CaptchaHelperTest extends GalleryTestCase { } class CaptchaHelperTestPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_function_exists; + public function setFunctionExists($functionName, $bool) { $this->_function_exists[$functionName] = $bool; } diff --git a/modules/captcha/test/phpunit/CaptchaValidationPluginTest.class b/modules/captcha/test/phpunit/CaptchaValidationPluginTest.class index d0616d44..dfb7c3a2 100644 --- a/modules/captcha/test/phpunit/CaptchaValidationPluginTest.class +++ b/modules/captcha/test/phpunit/CaptchaValidationPluginTest.class @@ -27,6 +27,11 @@ * @version $Revision: 17580 $ */ class CaptchaValidationPluginTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_plugin; + public $_saveSessionCount; + public $_form; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/cart/test/phpunit/AddToCartControllerTest.class b/modules/cart/test/phpunit/AddToCartControllerTest.class index 8d9ccd57..8dcf6a03 100644 --- a/modules/cart/test/phpunit/AddToCartControllerTest.class +++ b/modules/cart/test/phpunit/AddToCartControllerTest.class @@ -26,6 +26,9 @@ * @version $Revision: 17580 $ */ class AddToCartControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_saveCartItemCounts; + public function __construct($methodName) { parent::__construct($methodName, 'cart.AddToCart'); } diff --git a/modules/cart/test/phpunit/CartHelperTest.class b/modules/cart/test/phpunit/CartHelperTest.class index f719d4c7..820db15b 100644 --- a/modules/cart/test/phpunit/CartHelperTest.class +++ b/modules/cart/test/phpunit/CartHelperTest.class @@ -28,6 +28,9 @@ GalleryCoreApi::requireOnce('modules/cart/classes/CartHelper.class'); * @version $Revision: 17580 $ */ class CartHelperTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_saveCartItemCounts; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/cart/test/phpunit/ModifyCartControllerTest.class b/modules/cart/test/phpunit/ModifyCartControllerTest.class index cd840374..4af560d0 100644 --- a/modules/cart/test/phpunit/ModifyCartControllerTest.class +++ b/modules/cart/test/phpunit/ModifyCartControllerTest.class @@ -28,6 +28,9 @@ GalleryCoreApi::requireOnce('modules/cart/classes/CartHelper.class'); * @version $Revision: 17923 $ */ class ModifyCartControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_saveCartItemCounts; + public function __construct($methodName) { parent::__construct($methodName, 'cart.ModifyCart'); } diff --git a/modules/cart/test/phpunit/ViewCartViewTest.class b/modules/cart/test/phpunit/ViewCartViewTest.class index 3410964d..22402a13 100644 --- a/modules/cart/test/phpunit/ViewCartViewTest.class +++ b/modules/cart/test/phpunit/ViewCartViewTest.class @@ -26,6 +26,11 @@ * @version $Revision: 17580 $ */ class ViewCartViewTest extends GalleryViewTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_photoItem; + public $_movieItem; + public $_saveCartItemCounts; + public function __construct($methodName) { parent::__construct($methodName, 'cart.ViewCart'); } diff --git a/modules/comment/test/phpunit/AddCommentControllerTest.class b/modules/comment/test/phpunit/AddCommentControllerTest.class index 696eb9e3..2733c77c 100644 --- a/modules/comment/test/phpunit/AddCommentControllerTest.class +++ b/modules/comment/test/phpunit/AddCommentControllerTest.class @@ -28,6 +28,10 @@ GalleryCoreApi::requireOnce('modules/comment/classes/GalleryCommentHelper.class' * @version $Revision: 17580 $ */ class AddCommentControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_saveMarkup; + public $_startTime; + public function __construct($methodName) { parent::__construct($methodName, 'comment.AddComment'); } diff --git a/modules/comment/test/phpunit/AkismetApiTest.class b/modules/comment/test/phpunit/AkismetApiTest.class index 1dbf28df..6e22a6ab 100644 --- a/modules/comment/test/phpunit/AkismetApiTest.class +++ b/modules/comment/test/phpunit/AkismetApiTest.class @@ -30,6 +30,9 @@ GalleryCoreApi::requireOnce('modules/comment/classes/AkismetApi.class'); * @version $Revision: 17989 $ */ class AkismetApiTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_akismet; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/comment/test/phpunit/CommentSearchTest.class b/modules/comment/test/phpunit/CommentSearchTest.class index a532e200..af942783 100644 --- a/modules/comment/test/phpunit/CommentSearchTest.class +++ b/modules/comment/test/phpunit/CommentSearchTest.class @@ -27,6 +27,9 @@ * @version $Revision: 17580 $ */ class CommentSearchTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_commentSearch; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/comment/test/phpunit/CommentSiteAdminControllerTest.class b/modules/comment/test/phpunit/CommentSiteAdminControllerTest.class index a4434d83..ff720bfd 100644 --- a/modules/comment/test/phpunit/CommentSiteAdminControllerTest.class +++ b/modules/comment/test/phpunit/CommentSiteAdminControllerTest.class @@ -352,6 +352,9 @@ class CommentSiteAdminControllerTest extends GalleryControllerTestCase { } class CommentSiteAdminControllerTest_FakeAkismetApi { + /* deprecated dynamic properties in php 8.2 */ + public $_legal; + public function __construct($legal = false) { $this->_legal = $legal; } diff --git a/modules/comment/test/phpunit/EditCommentControllerTest.class b/modules/comment/test/phpunit/EditCommentControllerTest.class index 2cd8b9d3..34433922 100644 --- a/modules/comment/test/phpunit/EditCommentControllerTest.class +++ b/modules/comment/test/phpunit/EditCommentControllerTest.class @@ -26,6 +26,11 @@ * @version $Revision: 17580 $ */ class EditCommentControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_anonymousUserId; + public $_anonymousUser; + public $_saveMarkup; + public function __construct($methodName) { parent::__construct($methodName, 'comment.EditComment'); } diff --git a/modules/comment/test/phpunit/ShowAllCommentsViewTest.class b/modules/comment/test/phpunit/ShowAllCommentsViewTest.class index b89cc0c1..bcad6080 100644 --- a/modules/comment/test/phpunit/ShowAllCommentsViewTest.class +++ b/modules/comment/test/phpunit/ShowAllCommentsViewTest.class @@ -27,6 +27,9 @@ * @version $Revision: 17679 $ */ class ShowAllCommentsViewTest extends GalleryViewTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_item2; + public function __construct($methodName) { parent::__construct($methodName, 'comment.ShowAllComments'); } diff --git a/modules/core/AdminMaintenance.inc b/modules/core/AdminMaintenance.inc index 5f19e86d..df301965 100644 --- a/modules/core/AdminMaintenance.inc +++ b/modules/core/AdminMaintenance.inc @@ -29,6 +29,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/helpers/MaintenanceHelper_simp */ class AdminMaintenanceController extends GalleryController { + /* deprecated dynamic properties in php 8.2 */ + var $_module; + /** * @see GalleryController::handleRequest */ diff --git a/modules/core/AdminRepository.inc b/modules/core/AdminRepository.inc index 4ae8b244..83935012 100644 --- a/modules/core/AdminRepository.inc +++ b/modules/core/AdminRepository.inc @@ -31,6 +31,9 @@ GalleryCoreApi::requireOnce( */ class AdminRepositoryController extends AdminRepositoryDownloadAndInstallController { + /* deprecated dynamic properties in php 8.2 */ + var $_repositories; + /** * Get the repositories, but allow tests to inject their own version. * @see GalleryRepository::getRepositories diff --git a/modules/core/Callbacks.inc b/modules/core/Callbacks.inc index a6291c66..c532f2ed 100644 --- a/modules/core/Callbacks.inc +++ b/modules/core/Callbacks.inc @@ -24,6 +24,9 @@ * @version $Revision: 17580 $ */ class CoreCallbacks { + /* deprecated dynamic properties in php 8.2 */ + var $_tpl_vars; + function callback($params, &$smarty, $callback, $userId=null) { global $gallery; $block =& $smarty->_tpl_vars['block']; diff --git a/modules/core/ItemAdd.inc b/modules/core/ItemAdd.inc index 20e29488..b428145f 100644 --- a/modules/core/ItemAdd.inc +++ b/modules/core/ItemAdd.inc @@ -34,6 +34,16 @@ class ItemAddController extends GalleryController { */ var $_optionInstances; + /* Deprecated dynamic properties in php 8.2 */ + var $_coreModule; + var $_templateAdapter; + var $_storage; + var $_processingItemsMessage; + var $_extractionToolkitMap; + var $_processedItems; + var $_platform; + var $_extractingArchiveMessage; + /** * Tests can use this method to hardwire a specific set of option instances to use. * This avoids situations where some of the option instances will do unpredictable diff --git a/modules/core/classes/Gallery.class b/modules/core/classes/Gallery.class index cc3b129f..8839274c 100644 --- a/modules/core/classes/Gallery.class +++ b/modules/core/classes/Gallery.class @@ -167,6 +167,9 @@ class Gallery { */ var $_phpVm = null; + /* deprecated dynamic properties in php 8.2 */ + var $_squareQueue; + function __construct() { $this->_activeUser = null; diff --git a/modules/core/classes/GalleryDynamicAlbum.class b/modules/core/classes/GalleryDynamicAlbum.class index 63651e2b..b2d6d934 100644 --- a/modules/core/classes/GalleryDynamicAlbum.class +++ b/modules/core/classes/GalleryDynamicAlbum.class @@ -37,6 +37,9 @@ class GalleryDynamicAlbum extends GalleryItem { */ var $_itemTypeName; + /* deprecate dynamic properties in php 8.2 */ + var $urlParams; + var $getChildrenFunction; /** * Initialize dynamic album diff --git a/modules/core/classes/GalleryPlatform.class b/modules/core/classes/GalleryPlatform.class index 958b6930..04dc8aeb 100644 --- a/modules/core/classes/GalleryPlatform.class +++ b/modules/core/classes/GalleryPlatform.class @@ -39,6 +39,11 @@ class GalleryPlatform { 'html', 'js', 'htm', 'shtml', 'vbs', 'dll', 'jsp' , 'cfm', 'reg', 'shtm', 'phtm', 'exe', 'bat', 'sh', 'cmd', 'install', 'pl', 'tcl', 'py', 'com', 'rb', 'asp', 'aspx', 'ascx'); + /* deprecated dynamic properties in php 8.2 */ + var $_filePerms; + var $_dirPerms; + var $_umask; + /** * Copy a file. * @param string $source the source file diff --git a/modules/core/classes/GalleryPlatform/UnixPlatform.class b/modules/core/classes/GalleryPlatform/UnixPlatform.class index 0175c4a6..001cb20a 100644 --- a/modules/core/classes/GalleryPlatform/UnixPlatform.class +++ b/modules/core/classes/GalleryPlatform/UnixPlatform.class @@ -29,6 +29,10 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryPlatform.class'); */ class UnixPlatform extends GalleryPlatform { + /* deprecated dynamic properties in php 8.2 */ + var $_beNice; + var $_execExpectedStatus; + /** * @see GalleryPlatform::exec */ diff --git a/modules/core/classes/GalleryRepositoryIndex.class b/modules/core/classes/GalleryRepositoryIndex.class index 5b9d93fe..378f66d0 100644 --- a/modules/core/classes/GalleryRepositoryIndex.class +++ b/modules/core/classes/GalleryRepositoryIndex.class @@ -57,6 +57,9 @@ class GalleryRepositoryIndex { */ var $_utilities; + /* deprecated dynamic properties in php 8.2 */ + var $utilities; + function __construct($source) { $this->_utilities = new GalleryRepositoryUtilities(); diff --git a/modules/core/classes/GallerySmarty.class b/modules/core/classes/GallerySmarty.class index 46f8551d..0770e52b 100644 --- a/modules/core/classes/GallerySmarty.class +++ b/modules/core/classes/GallerySmarty.class @@ -42,6 +42,9 @@ class GallerySmarty extends Smarty { */ var $_firstGalleryStatus; + /* deprecated dynamic properties in php 8.2 */ + var $_cache_include_info; + /** * Fetch should also return a GalleryStatus object diff --git a/modules/core/classes/GalleryStatus.class b/modules/core/classes/GalleryStatus.class index 0e57a80e..9b7a0672 100644 --- a/modules/core/classes/GalleryStatus.class +++ b/modules/core/classes/GalleryStatus.class @@ -48,6 +48,8 @@ class GalleryStatus { */ var $_errorMessage; + /* deprecated dynamic properties in php 8.2 */ + var $_stackTrace; /** * Constructor diff --git a/modules/core/classes/GalleryStorage/GalleryDatabaseImport.class b/modules/core/classes/GalleryStorage/GalleryDatabaseImport.class index fc140239..f0fe7169 100644 --- a/modules/core/classes/GalleryStorage/GalleryDatabaseImport.class +++ b/modules/core/classes/GalleryStorage/GalleryDatabaseImport.class @@ -137,6 +137,11 @@ class GalleryDatabaseImport extends GalleryImportElement { */ var $_fileReadChunkSize = 8192; + /* deprecated dynamic properties in php 8.2 */ + var $_installedModuleVersion; + var $_installedCoreVersion; + var $_installedThemeVersion; + function __construct() { parent::__construct(); } @@ -744,6 +749,10 @@ class _GalleryRowTag extends GalleryImportElement { /** Holds the generated insert for this table */ var $_currentSql; + /* deprecated dynamic properties in php 8.2 */ + var $_fields; + var $_fieldNames; + function __construct($parent, $tableName, $fields, $attributes) { parent::__construct($parent); $this->_fields = $fields; diff --git a/modules/core/classes/GalleryStorage/GalleryStorageExtras.class b/modules/core/classes/GalleryStorage/GalleryStorageExtras.class index ab36849d..fc9e543c 100644 --- a/modules/core/classes/GalleryStorage/GalleryStorageExtras.class +++ b/modules/core/classes/GalleryStorage/GalleryStorageExtras.class @@ -27,6 +27,9 @@ * @version $Revision: 17988 $ */ class GalleryStorageExtras /* the other half of GalleryStorage */ { + /* deprecated dynamic properties in php 8.2 */ + var $_gs; + /** * @param GalleryStorage $galleryStorage the database storage instance */ diff --git a/modules/core/classes/GalleryStorage/PostgreSqlStorage.class b/modules/core/classes/GalleryStorage/PostgreSqlStorage.class index 9c59194b..b47180a0 100644 --- a/modules/core/classes/GalleryStorage/PostgreSqlStorage.class +++ b/modules/core/classes/GalleryStorage/PostgreSqlStorage.class @@ -31,6 +31,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryStorage.class'); */ class PostgreSqlStorage extends GalleryStorage { + /* deprecated dynamic properties in php 8.2 */ + public $_serverInfo; + function __construct($config) { parent::__construct($config); $this->_isTransactional = true; diff --git a/modules/core/classes/GalleryUnknownItem.class b/modules/core/classes/GalleryUnknownItem.class index 631aa2e5..819da71b 100644 --- a/modules/core/classes/GalleryUnknownItem.class +++ b/modules/core/classes/GalleryUnknownItem.class @@ -40,6 +40,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryDataItem.class'); */ class GalleryUnknownItem extends GalleryDataItem { + /* deprecated dynamic properties in php 8.2 */ + var $parent; + /** * Create a new GalleryUnknownItem from an image file * diff --git a/modules/core/classes/GalleryUrlGenerator.class b/modules/core/classes/GalleryUrlGenerator.class index b4426f76..c5c13eec 100644 --- a/modules/core/classes/GalleryUrlGenerator.class +++ b/modules/core/classes/GalleryUrlGenerator.class @@ -62,6 +62,13 @@ class GalleryUrlGenerator { */ var $_path; + /* deprecated dynamic properties in php 8.2 */ + var $_hasRequestUriShortUrlPrefix; + var $_cookiePath; + var $_localUrlMap; + var $_localUrlMapDirty; + var $_rootItemId; + /** * The host string of generated URLs (including optional port) eg. 'www.example.com'. * @@ -130,6 +137,9 @@ class GalleryUrlGenerator { */ var $_isCookiePathConfigured; + /* deprecated dynamic properties in php 8.2 */ + var $_returnUrlData; + /* * **************************************** * Static Methods diff --git a/modules/core/module.inc b/modules/core/module.inc index d12a3f80..abc3c40b 100644 --- a/modules/core/module.inc +++ b/modules/core/module.inc @@ -26,6 +26,9 @@ */ class CoreModule extends GalleryModule { + /* deprecated dynamic properties in php 8.2 */ + var $_galleryVersion; + function __construct() { global $gallery; diff --git a/modules/core/test/phpunit/AdminCoreControllerTest.class b/modules/core/test/phpunit/AdminCoreControllerTest.class index 17e0c776..b5b9ae94 100644 --- a/modules/core/test/phpunit/AdminCoreControllerTest.class +++ b/modules/core/test/phpunit/AdminCoreControllerTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17630 $ */ class AdminCoreControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_valueMap; + public function __construct($methodName) { parent::__construct($methodName, 'core.AdminCore'); } @@ -690,6 +693,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryPlatform/UnixPlatform.c GalleryCoreApi::requireOnce('modules/core/classes/GalleryPlatform/WinNtPlatform.class'); class AdminCoreControllerTestUnixPlatform extends UnixPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_succeed; + public function __construct($succeed) { $this->_succeed = $succeed; } diff --git a/modules/core/test/phpunit/AdminDeleteUserControllerTest.class b/modules/core/test/phpunit/AdminDeleteUserControllerTest.class index a63fd892..a34f635e 100644 --- a/modules/core/test/phpunit/AdminDeleteUserControllerTest.class +++ b/modules/core/test/phpunit/AdminDeleteUserControllerTest.class @@ -26,6 +26,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryDataCache.class'); * @version $Revision: 17580 $ */ class AdminDeleteUserControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_userIds; + public function __construct($methodName) { parent::__construct($methodName, 'core.AdminDeleteUser'); } diff --git a/modules/core/test/phpunit/AdminEditGroupUsersControllerTest.class b/modules/core/test/phpunit/AdminEditGroupUsersControllerTest.class index 939ca085..5b2361d1 100644 --- a/modules/core/test/phpunit/AdminEditGroupUsersControllerTest.class +++ b/modules/core/test/phpunit/AdminEditGroupUsersControllerTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class AdminEditGroupUsersControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_group; + public function __construct($methodName) { parent::__construct($methodName, 'core.AdminEditGroupUsers'); } diff --git a/modules/core/test/phpunit/AdminLanguageManagerControllerTest.class b/modules/core/test/phpunit/AdminLanguageManagerControllerTest.class index 1ba27204..b781f3ff 100644 --- a/modules/core/test/phpunit/AdminLanguageManagerControllerTest.class +++ b/modules/core/test/phpunit/AdminLanguageManagerControllerTest.class @@ -28,6 +28,10 @@ GalleryCoreApi::requireOnce('modules/core/AdminLanguageManager.inc'); class AdminLanguageManagerControllerTest extends GalleryControllerTestCase { public $_galleryTemplateAdapter; + /* deprecated dynamic properties in php 8.2 */ + public $_useBrowserPref; + public $_defaultLanguage; + public function __construct($methodName) { parent::__construct($methodName, 'core.AdminLanguageManager'); } diff --git a/modules/core/test/phpunit/AdminMaintenanceControllerModeTest.class b/modules/core/test/phpunit/AdminMaintenanceControllerModeTest.class index 93d02d2f..e86039a5 100644 --- a/modules/core/test/phpunit/AdminMaintenanceControllerModeTest.class +++ b/modules/core/test/phpunit/AdminMaintenanceControllerModeTest.class @@ -25,6 +25,11 @@ * @version $Revision: 17580 $ */ class AdminMaintenanceControllerModeTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_versionFileContents; + public $_versionFile; + public $_versionContentsBase; + public function __construct($methodName) { parent::__construct($methodName, 'core.AdminMaintenance'); } diff --git a/modules/core/test/phpunit/AdminRepositoryDownloadAndInstallControllerTest.class b/modules/core/test/phpunit/AdminRepositoryDownloadAndInstallControllerTest.class index 6b5af677..7064989e 100644 --- a/modules/core/test/phpunit/AdminRepositoryDownloadAndInstallControllerTest.class +++ b/modules/core/test/phpunit/AdminRepositoryDownloadAndInstallControllerTest.class @@ -30,6 +30,9 @@ GalleryCoreApi::requireOnce( class AdminRepositoryDownloadAndInstallControllerTest extends GalleryControllerTestCase { public $_galleryTemplateAdapter; + /* deprecated dynamic properties in php 8.2 */ + public $_coreModule; + public function __construct($methodName) { parent::__construct($methodName, 'core.AdminRepositoryDownloadAndInstall'); } @@ -992,6 +995,9 @@ class AdminRepositoryDownloadAndInstallControllerTestWrapper extends AdminReposi } class AdminRepositoryDownloadAndInstallControllerTestPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_class_exists; + public function __construct() { $this->_class_exists = false; } diff --git a/modules/core/test/phpunit/AdminRepositoryDownloadControllerTest.class b/modules/core/test/phpunit/AdminRepositoryDownloadControllerTest.class index 0ed66ee1..5ae21fd9 100644 --- a/modules/core/test/phpunit/AdminRepositoryDownloadControllerTest.class +++ b/modules/core/test/phpunit/AdminRepositoryDownloadControllerTest.class @@ -266,6 +266,9 @@ class AdminRepositoryDownloadControllerTestWrapper extends AdminRepositoryDownlo } class AdminRepositoryDownloadControllerTestPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_class_exists; + public function __construct() { $this->_class_exists = false; } diff --git a/modules/core/test/phpunit/AdminThemesControllerTest.class b/modules/core/test/phpunit/AdminThemesControllerTest.class index b46c6338..78cab1f1 100644 --- a/modules/core/test/phpunit/AdminThemesControllerTest.class +++ b/modules/core/test/phpunit/AdminThemesControllerTest.class @@ -26,6 +26,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryTheme.class'); * @version $Revision: 17580 $ */ class AdminThemesControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_testTheme; + public function __construct($methodName) { parent::__construct($methodName, 'core.AdminThemes'); } @@ -492,6 +495,9 @@ class TestThemeId2Theme extends GalleryTheme { * Test theme */ class AdminThemesControllerTestTheme { + /* deprecated dynamic properties in php 8.2 */ + public $_callMap; + public static function getMe() { static $instance; diff --git a/modules/core/test/phpunit/AlbumTest.class b/modules/core/test/phpunit/AlbumTest.class index b2575a8e..df890d1d 100644 --- a/modules/core/test/phpunit/AlbumTest.class +++ b/modules/core/test/phpunit/AlbumTest.class @@ -24,7 +24,9 @@ * @author Bharat Mediratta * @version $Revision: 17589 $ */ -class AlbumTest extends GalleryTestCase{ +class AlbumTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $previousValueSlugMode; public function setUpSlug($slugMode) { diff --git a/modules/core/test/phpunit/BuildDerivativesTaskTest.class b/modules/core/test/phpunit/BuildDerivativesTaskTest.class index d3c645de..c9686706 100644 --- a/modules/core/test/phpunit/BuildDerivativesTaskTest.class +++ b/modules/core/test/phpunit/BuildDerivativesTaskTest.class @@ -134,6 +134,10 @@ class BuildDerivativesTaskTest extends GalleryTestCase { } class BuildDerivativesTaskTestStorage { + /* deprecated dynamic properties in php 8.2 */ + public $_storage; + public $_searches; + public function __construct($storage) { $this->_storage = $storage; $this->_searches = array(); diff --git a/modules/core/test/phpunit/CharsetTest.class b/modules/core/test/phpunit/CharsetTest.class index 7710189c..2807cc05 100644 --- a/modules/core/test/phpunit/CharsetTest.class +++ b/modules/core/test/phpunit/CharsetTest.class @@ -816,6 +816,10 @@ class CharsetTest extends GalleryTestCase { } class CharsetTestPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_function_exists; + public $_returns; + public function setFunctionExists($functionName, $bool) { $this->_function_exists[$functionName] = $bool; } diff --git a/modules/core/test/phpunit/ChildTest.class b/modules/core/test/phpunit/ChildTest.class index cc9c5701..2819aca5 100644 --- a/modules/core/test/phpunit/ChildTest.class +++ b/modules/core/test/phpunit/ChildTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class ChildTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_rootHighlight; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/CodeAuditTest.class b/modules/core/test/phpunit/CodeAuditTest.class index 3d97446d..12ec6200 100644 --- a/modules/core/test/phpunit/CodeAuditTest.class +++ b/modules/core/test/phpunit/CodeAuditTest.class @@ -27,6 +27,18 @@ * @version $Revision: 20940 $ */ class CodeAuditTest extends CodeAuditTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_shouldHalt; + public $_baseDir; + public $_checkTime; + public $_exception; + public $_longLineFiles; + public $_errorCount; + public $_lineEnding; + public $_phpEndFile; + public $_preamble; + public $_preamblePattern; + public function __construct($methodName) { global $gallery; diff --git a/modules/core/test/phpunit/ControllerTest.class b/modules/core/test/phpunit/ControllerTest.class index 97b4dc28..98385819 100644 --- a/modules/core/test/phpunit/ControllerTest.class +++ b/modules/core/test/phpunit/ControllerTest.class @@ -26,6 +26,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryController.class'); * @version $Revision: 17788 $ */ class ControllerTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_originalIsPersistentSession; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/CoreSearchTest.class b/modules/core/test/phpunit/CoreSearchTest.class index e66157f0..155b56ad 100644 --- a/modules/core/test/phpunit/CoreSearchTest.class +++ b/modules/core/test/phpunit/CoreSearchTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class CoreSearchTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_coreSearch; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/CreateThumbnailOptionTest.class b/modules/core/test/phpunit/CreateThumbnailOptionTest.class index 027f9917..e8abf1ee 100644 --- a/modules/core/test/phpunit/CreateThumbnailOptionTest.class +++ b/modules/core/test/phpunit/CreateThumbnailOptionTest.class @@ -26,6 +26,9 @@ GalleryCoreApi::requireOnce('lib/tools/phpunit/ItemAddOptionTestCase.class'); * @version $Revision: 17580 $ */ class CreateThumbnailOptionTest extends ItemAddOptionTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_itemThumbnail; + public function __construct($methodName) { parent::__construct($methodName, 'core', 'CreateThumbnailOption'); } diff --git a/modules/core/test/phpunit/DataCacheTest.class b/modules/core/test/phpunit/DataCacheTest.class index 5e6fb251..4ea58e4f 100644 --- a/modules/core/test/phpunit/DataCacheTest.class +++ b/modules/core/test/phpunit/DataCacheTest.class @@ -1173,6 +1173,10 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryPhpVm.class'); * Mock VM */ class DataCacheTestMockVm extends GalleryPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_time; + public $_randValue; + public function setTime($time) { $this->_time = $time; } diff --git a/modules/core/test/phpunit/DatabaseExportTest.class b/modules/core/test/phpunit/DatabaseExportTest.class index f00c8496..93a10b23 100644 --- a/modules/core/test/phpunit/DatabaseExportTest.class +++ b/modules/core/test/phpunit/DatabaseExportTest.class @@ -27,6 +27,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryStorage.class'); * @version $Revision: 17580 $ */ class DatabaseExportTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_export; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/DatabaseImportTest.class b/modules/core/test/phpunit/DatabaseImportTest.class index b1f6a7cb..bb8fd474 100644 --- a/modules/core/test/phpunit/DatabaseImportTest.class +++ b/modules/core/test/phpunit/DatabaseImportTest.class @@ -27,6 +27,10 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryStorage.class'); * @version $Revision: 20957 $ */ class DatabaseImportTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_testObj; + public $_xmlParser; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/DatabaseStorageTest.class b/modules/core/test/phpunit/DatabaseStorageTest.class index 6415501b..1325a81f 100644 --- a/modules/core/test/phpunit/DatabaseStorageTest.class +++ b/modules/core/test/phpunit/DatabaseStorageTest.class @@ -26,6 +26,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryStorage/GalleryStorageE * @version $Revision: 17580 $ */ class DatabaseStorageTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_data; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/DeleteSessionsTaskTest.class b/modules/core/test/phpunit/DeleteSessionsTaskTest.class index 5ec6eabc..bcbcd19c 100644 --- a/modules/core/test/phpunit/DeleteSessionsTaskTest.class +++ b/modules/core/test/phpunit/DeleteSessionsTaskTest.class @@ -26,6 +26,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/DeleteSessionsTask.class'); * @version $Revision: 17580 $ */ class DeleteSessionsTaskTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_core; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/EmbedTest.class b/modules/core/test/phpunit/EmbedTest.class index 4945232d..df52aa06 100644 --- a/modules/core/test/phpunit/EmbedTest.class +++ b/modules/core/test/phpunit/EmbedTest.class @@ -27,6 +27,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryEmbed.class'); * @version $Revision: 17775 $ */ class EmbedTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_origGallery; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/EventLogHelperTest.class b/modules/core/test/phpunit/EventLogHelperTest.class index de84b74a..15875286 100644 --- a/modules/core/test/phpunit/EventLogHelperTest.class +++ b/modules/core/test/phpunit/EventLogHelperTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class EventLogHelperTest extends GalleryTestCase { + /* deprecated dynamic properties in ph 8.2 */ + public $_location; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/EventTest.class b/modules/core/test/phpunit/EventTest.class index f7d8eda9..0cd05d07 100644 --- a/modules/core/test/phpunit/EventTest.class +++ b/modules/core/test/phpunit/EventTest.class @@ -293,6 +293,9 @@ class EventTestEventListener { * Mock platform. */ class EventTestPlatform extends GalleryPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_list; + public function opendir($path) { if (substr($path, -8) == 'modules/') { $this->_list = array(); diff --git a/modules/core/test/phpunit/FastDownloadTest.class b/modules/core/test/phpunit/FastDownloadTest.class index 18dc5ec5..d3f78aa5 100644 --- a/modules/core/test/phpunit/FastDownloadTest.class +++ b/modules/core/test/phpunit/FastDownloadTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class FastDownloadTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_derivatives; + public function __construct($methodName) { parent::__construct($methodName); } @@ -412,6 +415,9 @@ class FastDownloadTest extends GalleryTestCase { * Fake platform that simulates writing to a file and captures the output */ class FastDownloadTestCreateFastDownloadPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_buf; + public $_stat; public function __construct(&$buf) { @@ -460,6 +466,9 @@ class FastDownloadTestCreateFastDownloadPlatform { * Test platform to verify that we are deleting cache files */ class FastDownloadTestRemovePermissionPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_buf; + public $_stat; public function __construct(&$buf) { diff --git a/modules/core/test/phpunit/FileSystemTest.class b/modules/core/test/phpunit/FileSystemTest.class index 968ed79c..350b6db1 100644 --- a/modules/core/test/phpunit/FileSystemTest.class +++ b/modules/core/test/phpunit/FileSystemTest.class @@ -616,6 +616,9 @@ class FileSystemTest extends GalleryTestCase { * @subpackage PHPUnit */ class FileSystemTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_separator; + public function __construct($separator) { $this->_separator = $separator; } @@ -634,6 +637,9 @@ class FileSystemTestPlatform { * @subpackage PHPUnit */ class FileSystemTestPlatformForRename extends GalleryPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_separator; + public function __construct($separator) { $this->_separator = $separator; } diff --git a/modules/core/test/phpunit/FlushDatabaseCacheTaskTest.class b/modules/core/test/phpunit/FlushDatabaseCacheTaskTest.class index daa22ddf..9b1a3d00 100644 --- a/modules/core/test/phpunit/FlushDatabaseCacheTaskTest.class +++ b/modules/core/test/phpunit/FlushDatabaseCacheTaskTest.class @@ -138,6 +138,9 @@ class FlushDatabaseCacheTaskTest extends GalleryTestCase { } class FlushDatabaseCacheTaskTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_failedCalls; + public function __construct($failedCalls) { GalleryUtilities::putRequestVariable('calls', array()); diff --git a/modules/core/test/phpunit/FlushTemplatesTaskTest.class b/modules/core/test/phpunit/FlushTemplatesTaskTest.class index 00efd60a..d477ca77 100644 --- a/modules/core/test/phpunit/FlushTemplatesTaskTest.class +++ b/modules/core/test/phpunit/FlushTemplatesTaskTest.class @@ -116,6 +116,9 @@ class FlushTemplatesTaskTest extends GalleryTestCase { } class FlushTemplatesTaskTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_failedCalls; + public function __construct($failedCalls) { GalleryUtilities::putRequestVariable('calls', array()); diff --git a/modules/core/test/phpunit/ItemAddControllerTest.class b/modules/core/test/phpunit/ItemAddControllerTest.class index 9df321b0..8ae8b920 100644 --- a/modules/core/test/phpunit/ItemAddControllerTest.class +++ b/modules/core/test/phpunit/ItemAddControllerTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class ItemAddControllerTest extends GalleryControllerTestCase { + /* deprecated dynamci properties in php 8.2 */ + public $_templateAdapter; + public function __construct($methodName) { parent::__construct($methodName, 'core.ItemAdd'); } @@ -1152,6 +1155,9 @@ class ItemAddControllerTestPluginFail { * Test ItemAddOption */ class ItemAddTestOption extends ItemAddOption { + /* deprecated dynamic properties in php 8.2 */ + public $_withError; + public function __construct($withError = false) { $this->_withError = $withError; $_SERVER['ItemAddControllerTest']['optionCalls'] = array(); diff --git a/modules/core/test/phpunit/ItemAddFromBrowserTest.class b/modules/core/test/phpunit/ItemAddFromBrowserTest.class index 533a8389..d8f6b939 100644 --- a/modules/core/test/phpunit/ItemAddFromBrowserTest.class +++ b/modules/core/test/phpunit/ItemAddFromBrowserTest.class @@ -25,6 +25,11 @@ * @version $Revision: 17580 $ */ class ItemAddFromBrowserTest extends ItemAddPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_addController; + public $_rootAlbum; + public $_lockIds; + public function __construct($methodName) { parent::__construct($methodName, 'core', 'ItemAddFromBrowser'); } diff --git a/modules/core/test/phpunit/ItemAttributesTest.class b/modules/core/test/phpunit/ItemAttributesTest.class index eedf6196..f35dc78b 100644 --- a/modules/core/test/phpunit/ItemAttributesTest.class +++ b/modules/core/test/phpunit/ItemAttributesTest.class @@ -917,6 +917,11 @@ class ItemAttributesTestSession { public $_userId; public $_creationTime; + /* deprecated dynamic properties in php 8.2 */ + public $_isPersistent; + public $_isSearchEngineSession; + public $_data; + public function __construct($isPersistent = true, $isSearchEngineSession = false) { $this->_creationTime = time(); $this->_isPersistent = $isPersistent; @@ -965,6 +970,11 @@ class ItemAttributesTestSession { } class ItemAttributesTestPhpVm extends GalleryPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_getAllHeadersExists; + public $_headers; + public $_time; + public function __construct($getAllHeadersExists = false, $headers = array(), $time = null) { $this->_getAllHeadersExists = $getAllHeadersExists; $this->_headers = $headers; diff --git a/modules/core/test/phpunit/ItemEditAlbumPluginTest.class b/modules/core/test/phpunit/ItemEditAlbumPluginTest.class index a4fbc2f3..dc598603 100644 --- a/modules/core/test/phpunit/ItemEditAlbumPluginTest.class +++ b/modules/core/test/phpunit/ItemEditAlbumPluginTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class ItemEditAlbumPluginTest extends ItemEditPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_childAlbum; + public function __construct($methodName) { parent::__construct($methodName, 'core', 'ItemEditAlbum'); } diff --git a/modules/core/test/phpunit/ItemEditItemPluginTest.class b/modules/core/test/phpunit/ItemEditItemPluginTest.class index 8d701a5b..e62cde64 100644 --- a/modules/core/test/phpunit/ItemEditItemPluginTest.class +++ b/modules/core/test/phpunit/ItemEditItemPluginTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class ItemEditItemPluginTest extends ItemEditPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_thumbnail; + public function __construct($methodName) { parent::__construct($methodName, 'core', 'ItemEditItem'); } diff --git a/modules/core/test/phpunit/ItemEditMoviePluginTest.class b/modules/core/test/phpunit/ItemEditMoviePluginTest.class index 286a0bb9..54bd639a 100644 --- a/modules/core/test/phpunit/ItemEditMoviePluginTest.class +++ b/modules/core/test/phpunit/ItemEditMoviePluginTest.class @@ -161,6 +161,9 @@ class ItemEditMoviePluginTest extends ItemEditPluginTestCase { * @subpackage PHPUnit */ class ItemEditMoviePluginTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_platform; + public function __construct($originalPlatform) { $this->_platform = $originalPlatform; } diff --git a/modules/core/test/phpunit/ItemEditPhotoPluginTest.class b/modules/core/test/phpunit/ItemEditPhotoPluginTest.class index 2a8ba869..e2c9bb9b 100644 --- a/modules/core/test/phpunit/ItemEditPhotoPluginTest.class +++ b/modules/core/test/phpunit/ItemEditPhotoPluginTest.class @@ -25,6 +25,10 @@ * @version $Revision: 17580 $ */ class ItemEditPhotoPluginTest extends ItemEditPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_blob; + public $_unused; + public function __construct($methodName) { parent::__construct($methodName, 'core', 'ItemEditPhoto'); } diff --git a/modules/core/test/phpunit/ItemEditPhotoThumbnailPluginTest.class b/modules/core/test/phpunit/ItemEditPhotoThumbnailPluginTest.class index 9dc85b34..f5734522 100644 --- a/modules/core/test/phpunit/ItemEditPhotoThumbnailPluginTest.class +++ b/modules/core/test/phpunit/ItemEditPhotoThumbnailPluginTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class ItemEditPhotoThumbnailPluginTest extends ItemEditPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_item2; + public function __construct($methodName) { parent::__construct($methodName, 'core', 'ItemEditPhotoThumbnail'); } diff --git a/modules/core/test/phpunit/ItemEditRotateAndScalePhotoPluginTest.class b/modules/core/test/phpunit/ItemEditRotateAndScalePhotoPluginTest.class index e7e91d2b..1b391cd1 100644 --- a/modules/core/test/phpunit/ItemEditRotateAndScalePhotoPluginTest.class +++ b/modules/core/test/phpunit/ItemEditRotateAndScalePhotoPluginTest.class @@ -25,6 +25,10 @@ * @version $Revision: 17580 $ */ class ItemEditRotateAndScalePhotoPluginTest extends ItemEditPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_blob; + public $_blobDerivative; + public function __construct($methodName) { parent::__construct($methodName, 'core', 'ItemEditRotateAndScalePhoto'); } diff --git a/modules/core/test/phpunit/ItemEditThemePluginTest.class b/modules/core/test/phpunit/ItemEditThemePluginTest.class index 2b887152..27cb11ff 100644 --- a/modules/core/test/phpunit/ItemEditThemePluginTest.class +++ b/modules/core/test/phpunit/ItemEditThemePluginTest.class @@ -25,6 +25,11 @@ * @version $Revision: 17580 $ */ class ItemEditThemePluginTest extends ItemEditPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_childAlbum; + public $_grandchildAlbum; + public $_savedPlatform; + public function __construct($methodName) { parent::__construct($methodName, 'core', 'ItemEditTheme'); } @@ -488,6 +493,9 @@ class ItemEditThemeControllerTestTheme { * Test platform */ class ItemEditThemeTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_savedPlatform; + public function __construct($originalPlatform) { $this->_savedPlatform = $originalPlatform; } diff --git a/modules/core/test/phpunit/ItemMakeHighlightControllerTest.class b/modules/core/test/phpunit/ItemMakeHighlightControllerTest.class index bd379576..f49ac4cf 100644 --- a/modules/core/test/phpunit/ItemMakeHighlightControllerTest.class +++ b/modules/core/test/phpunit/ItemMakeHighlightControllerTest.class @@ -27,6 +27,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryToolkit.class'); * @version $Revision: 17580 $ */ class ItemMakeHighlightControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_subalbum; + public function __construct($methodName) { parent::__construct($methodName, 'core.ItemMakeHighlight'); } diff --git a/modules/core/test/phpunit/ItemMoveSingleControllerTest.class b/modules/core/test/phpunit/ItemMoveSingleControllerTest.class index fb87380d..95c8e43f 100644 --- a/modules/core/test/phpunit/ItemMoveSingleControllerTest.class +++ b/modules/core/test/phpunit/ItemMoveSingleControllerTest.class @@ -26,6 +26,11 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryToolkit.class'); * @version $Revision: 17580 $ */ class ItemMoveSingleControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_childAlbum; + public $_rootAlbum; + public $_destinationAlbum; + public function __construct($methodName) { parent::__construct($methodName, 'core.ItemMoveSingle'); } diff --git a/modules/core/test/phpunit/ItemOrderTest.class b/modules/core/test/phpunit/ItemOrderTest.class index ff221c4d..51e1d1d7 100644 --- a/modules/core/test/phpunit/ItemOrderTest.class +++ b/modules/core/test/phpunit/ItemOrderTest.class @@ -25,6 +25,10 @@ * @version $Revision: 17580 $ */ class ItemOrderTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_parentItem; + public $_childItems; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/ItemPermissionsControllerTest.class b/modules/core/test/phpunit/ItemPermissionsControllerTest.class index 6b6e5d2b..4fae5e28 100644 --- a/modules/core/test/phpunit/ItemPermissionsControllerTest.class +++ b/modules/core/test/phpunit/ItemPermissionsControllerTest.class @@ -25,6 +25,11 @@ * @version $Revision: 17580 $ */ class ItemPermissionsControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_albumParent; + public $_albumChild; + public $_group; + public function __construct($methodName) { parent::__construct($methodName, 'core.ItemPermissions'); } diff --git a/modules/core/test/phpunit/ItemTest.class b/modules/core/test/phpunit/ItemTest.class index ab21946a..f93ce511 100644 --- a/modules/core/test/phpunit/ItemTest.class +++ b/modules/core/test/phpunit/ItemTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class ItemTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_groupId; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/LanguageTest.class b/modules/core/test/phpunit/LanguageTest.class index 337a4223..480b6ded 100644 --- a/modules/core/test/phpunit/LanguageTest.class +++ b/modules/core/test/phpunit/LanguageTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class LanguageTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_siteLanguage; + public function __construct($methodName) { parent::__construct($methodName, 'core.ChangeLanguage'); } diff --git a/modules/core/test/phpunit/LocalizationAuditTest.class b/modules/core/test/phpunit/LocalizationAuditTest.class index fd54e08d..718d5c9b 100644 --- a/modules/core/test/phpunit/LocalizationAuditTest.class +++ b/modules/core/test/phpunit/LocalizationAuditTest.class @@ -27,6 +27,11 @@ class LocalizationAuditTest extends CodeAuditTestCase { public $_idMap = array(); + /* deprecated dynamic properties in php 8.2 */ + public $_shouldHalt; + public $_baseDir; + public $_errorCount; + public function __construct($methodName) { parent::__construct($methodName); diff --git a/modules/core/test/phpunit/LockTest.class b/modules/core/test/phpunit/LockTest.class index 570d37f3..7a8cc68d 100644 --- a/modules/core/test/phpunit/LockTest.class +++ b/modules/core/test/phpunit/LockTest.class @@ -27,6 +27,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/FlockLockSystem.class'); * @version $Revision: 17580 $ */ class LockTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_subAlbums; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/LogoutControllerTest.class b/modules/core/test/phpunit/LogoutControllerTest.class index 404c832f..cf2b9a40 100644 --- a/modules/core/test/phpunit/LogoutControllerTest.class +++ b/modules/core/test/phpunit/LogoutControllerTest.class @@ -25,6 +25,9 @@ * @version $Revision: 18040 $ */ class LogoutControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_anonymousId; + public function __construct($methodName) { parent::__construct($methodName, 'core.Logout'); } diff --git a/modules/core/test/phpunit/MailHelperTest.class b/modules/core/test/phpunit/MailHelperTest.class index 14af2b16..ef262eb9 100644 --- a/modules/core/test/phpunit/MailHelperTest.class +++ b/modules/core/test/phpunit/MailHelperTest.class @@ -25,6 +25,12 @@ * @version $Revision: 20940 $ */ class MailHelperTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $templateFile; + public $_originalPlatform; + public $_dummyPlatform; + public $_emailData; + public function __construct($methodName) { parent::__construct($methodName); } @@ -281,6 +287,9 @@ class MailHelperTest extends GalleryTestCase { * @subpackage PHPUnit */ class MailHelperDummyPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_platform; + public function __construct($platform) { $this->_platform = $platform; $_REQUEST['mailedCount'] = 0; diff --git a/modules/core/test/phpunit/MarkupTest.class b/modules/core/test/phpunit/MarkupTest.class index 9c5b8758..09333976 100644 --- a/modules/core/test/phpunit/MarkupTest.class +++ b/modules/core/test/phpunit/MarkupTest.class @@ -27,6 +27,11 @@ GalleryCoreApi::requireOnce('lib/smarty_plugins/modifier.markup.php'); * @version $Revision: 17580 $ */ class MarkupTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_bbcode; + public $_html; + public $_none; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/ModuleTest.class b/modules/core/test/phpunit/ModuleTest.class index c7e8cf99..4424e3fa 100644 --- a/modules/core/test/phpunit/ModuleTest.class +++ b/modules/core/test/phpunit/ModuleTest.class @@ -25,6 +25,10 @@ * @version $Revision: 17580 $ */ class ModuleTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_removedDir; + public $_rootAlbum; + public function setUp($x1 = null) { global $gallery; @@ -933,6 +937,10 @@ class ModuleTestEntity extends GalleryEntity { * @subpackage PHPUnit */ class ModuleTestPlatform extends GalleryPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_list; + public $_test; + public function __construct(&$test) { $this->_test =& $test; } diff --git a/modules/core/test/phpunit/MovieTest.class b/modules/core/test/phpunit/MovieTest.class index c856b897..519f77f5 100644 --- a/modules/core/test/phpunit/MovieTest.class +++ b/modules/core/test/phpunit/MovieTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class MovieTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_movie; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/OptimizeDatabaseTaskTest.class b/modules/core/test/phpunit/OptimizeDatabaseTaskTest.class index 9f616a36..8cd551fd 100644 --- a/modules/core/test/phpunit/OptimizeDatabaseTaskTest.class +++ b/modules/core/test/phpunit/OptimizeDatabaseTaskTest.class @@ -67,6 +67,9 @@ class OptimizeDatabaseTaskTest extends GalleryTestCase { } class OptimizeDatabaseTaskTestStorage { + /* deprecated dynanic properties in php 8.2 */ + public $_optimizeWasCalled; + public function __construct() { $this->_optimizeWasCalled = false; } diff --git a/modules/core/test/phpunit/Php43CompatibilityTest.class b/modules/core/test/phpunit/Php43CompatibilityTest.class index 3f3269ab..10553e93 100644 --- a/modules/core/test/phpunit/Php43CompatibilityTest.class +++ b/modules/core/test/phpunit/Php43CompatibilityTest.class @@ -26,6 +26,12 @@ * @version $Revision: 17580 $ */ class Php43CompatibilityTest extends CodeAuditTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_shouldHalt; + public $_baseDir; + public $_illegalRegexp; + public $_exceptions; + public function __construct($methodName) { parent::__construct($methodName); diff --git a/modules/core/test/phpunit/PhpDocAuditTest.class b/modules/core/test/phpunit/PhpDocAuditTest.class index 394b9cdf..fcb55b30 100644 --- a/modules/core/test/phpunit/PhpDocAuditTest.class +++ b/modules/core/test/phpunit/PhpDocAuditTest.class @@ -25,6 +25,11 @@ * @version $Revision: 17580 $ */ class PhpDocAuditTest extends CodeAuditTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_shouldHalt; + public $_baseDir; + public $_errorCount; + public $_packageMap = array(); public function __construct($methodName) { diff --git a/modules/core/test/phpunit/PlatformTest.class b/modules/core/test/phpunit/PlatformTest.class index 4a46c8d0..ad02323e 100644 --- a/modules/core/test/phpunit/PlatformTest.class +++ b/modules/core/test/phpunit/PlatformTest.class @@ -32,6 +32,14 @@ class PlatformTest extends GalleryTestCase { */ var $_platform = null; + /* deprecated dynamic properties in php 8.2 */ + var $_saveVars; + var $_saveSID; + var $_rootAlbumId; + var $_sourceFile; + var $_destFile; + var $_mail; + public function __construct($methodName) { parent::__construct($methodName); } @@ -816,63 +824,63 @@ class PlatformTest extends GalleryTestCase { $platform->setRealpathData( array( - "${s}test${s}" => "${s}test", - "${s}testing" => "${s}testing", + "{$s}test{$s}" => "{$s}test", + "{$s}testing" => "{$s}testing", ) ); - $gallery->_phpVm = new PlatformTestPhpVm("${s}test${s}", $this); + $gallery->_phpVm = new PlatformTestPhpVm("{$s}test{$s}", $this); - $this->assertFalse($platform->isRestrictedByOpenBaseDir("${s}test"), 'no trailing slash'); + $this->assertFalse($platform->isRestrictedByOpenBaseDir("{$s}test"), 'no trailing slash'); $this->assertTrue( - $platform->isRestrictedByOpenBaseDir("${s}testing"), + $platform->isRestrictedByOpenBaseDir("{$s}testing"), 'should not match basedir with trailing slash' ); // Invalid paths (realpath returns false, our code does relative path and .. handling) $platform->setRealpathData( array( - "${s}test" => "${s}test", + "{$s}test" => "{$s}test", ) ); - $gallery->_phpVm = new PlatformTestPhpVm("${s}test", $this); + $gallery->_phpVm = new PlatformTestPhpVm("{$s}test", $this); $this->assertTrue( - !$platform->isRestrictedByOpenBaseDir("${s}test${s}bogus"), + !$platform->isRestrictedByOpenBaseDir("{$s}test{$s}bogus"), 'valid bogus path' ); $this->assertTrue( - !$platform->isRestrictedByOpenBaseDir("${s}test${s}bogus${s}..${s}path"), + !$platform->isRestrictedByOpenBaseDir("{$s}test{$s}bogus{$s}..{$s}path"), 'single dotdot' ); $this->assertTrue( - $platform->isRestrictedByOpenBaseDir("${s}test${s}bogus${s}..${s}..${s}path"), + $platform->isRestrictedByOpenBaseDir("{$s}test{$s}bogus{$s}..{$s}..{$s}path"), 'multiple dotdots' ); $this->assertTrue( - $platform->isRestrictedByOpenBaseDir("${s}test${s}.."), + $platform->isRestrictedByOpenBaseDir("{$s}test{$s}.."), 'dotdot at end' ); $this->assertTrue( - !$platform->isRestrictedByOpenBaseDir("${s}.${s}test${s}bogus"), + !$platform->isRestrictedByOpenBaseDir("{$s}.{$s}test{$s}bogus"), 'dot in valid bogus path' ); $this->assertTrue( - !$platform->isRestrictedByOpenBaseDir("${s}.${s}test${s}.${s}bogus"), + !$platform->isRestrictedByOpenBaseDir("{$s}.{$s}test{$s}.{$s}bogus"), 'two dots in valid bogus path' ); - $platform->setCwd("${s}test"); + $platform->setCwd("{$s}test"); $this->assertTrue( !$platform->isRestrictedByOpenBaseDir('bogus'), 'valid relative path' ); $this->assertTrue( - $platform->isRestrictedByOpenBaseDir("..${s}bogus"), + $platform->isRestrictedByOpenBaseDir("..{$s}bogus"), 'invalid relative path' ); $this->assertTrue( - !$platform->isRestrictedByOpenBaseDir("bogus${s}path${s}..${s}..${s}test"), + !$platform->isRestrictedByOpenBaseDir("bogus{$s}path{$s}..{$s}..{$s}test"), 'valid relative path with two dotdots' ); } @@ -914,7 +922,7 @@ class PlatformTest extends GalleryTestCase { @$this->_platform->fclose($fd); } - public function ignore_error_handler($errno, $errstr) { + public static function ignore_error_handler($errno, $errstr) { return true; } @@ -1122,6 +1130,10 @@ class PlatformTest extends GalleryTestCase { } class PlatformTestPhpVm extends GalleryPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_iniVal; + public $_test; + public function __construct($iniVal, &$test) { $this->_iniVal = $iniVal; $this->_test =& $test; @@ -1151,6 +1163,10 @@ class PlatformTestPhpVm extends GalleryPhpVm { GalleryCoreApi::requireOnce('modules/core/classes/GalleryPlatform/UnixPlatform.class'); class PlatformTestOpenBaseDirUnixPlatform extends UnixPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_realpathData; + public $_cwd; + public function setRealpathData($realpathData) { $this->_realpathData = $realpathData; } diff --git a/modules/core/test/phpunit/PluginCallbackTest.class b/modules/core/test/phpunit/PluginCallbackTest.class index 91b3f625..731ef688 100644 --- a/modules/core/test/phpunit/PluginCallbackTest.class +++ b/modules/core/test/phpunit/PluginCallbackTest.class @@ -26,6 +26,9 @@ GalleryCoreApi::requireOnce('modules/core/PluginCallback.inc'); * @version $Revision: 17580 $ */ class PluginCallbackTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_testPlugin; + public function __construct($methodName) { parent::__construct($methodName); } @@ -1114,6 +1117,9 @@ class PluginCallbackTest extends GalleryTestCase { } class MockGalleryStatus { + /* deprecated dynamic properties in php 8.2 */ + public $something; + public function __construct() { // Put something in here so that empty($this) would not return true $this->something = 1; @@ -1142,6 +1148,10 @@ class MockGalleryStatus { } class PluginCallbackMockStorage { + /* deprecated dynamic properties in php 8.2 */ + public $rolledBack; + public $checkPointed; + public function rollbackTransaction() { $this->rolledBack = 1; @@ -1156,6 +1166,9 @@ class PluginCallbackMockStorage { } class PluginCallbackWithFakeHandler extends PluginCallbackView { + /* deprecated dynamic properties in php 8.2 */ + public $_replies; + /** * Class Loader */ diff --git a/modules/core/test/phpunit/PluginTest.class b/modules/core/test/phpunit/PluginTest.class index d00867e4..b5ef3ba0 100644 --- a/modules/core/test/phpunit/PluginTest.class +++ b/modules/core/test/phpunit/PluginTest.class @@ -329,6 +329,11 @@ class PluginTest extends GalleryTestCase { class PluginTestCompatibleModule extends GalleryModule {} class PluginTestPlugin extends GalleryPlugin { + /* deprecated dynamic properties in php 8.2 */ + public $_type; + public $_requiredThemeApi; + public $_requiredModuleApi; + public function setPluginType($type) { $this->_type = $type; } diff --git a/modules/core/test/phpunit/RepositoryDownloadPackagesTest.class b/modules/core/test/phpunit/RepositoryDownloadPackagesTest.class index 1350c202..c8a36a5b 100644 --- a/modules/core/test/phpunit/RepositoryDownloadPackagesTest.class +++ b/modules/core/test/phpunit/RepositoryDownloadPackagesTest.class @@ -26,6 +26,12 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryRepositoryUtilities.cla * @version $Revision: 17580 $ */ class RepositoryDownloadPackagesTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_repository; + public $_descriptor; + public $_templateAdapter; + public $_versions; + public function setUp($x1 = null) { $ret = parent::setUp(); diff --git a/modules/core/test/phpunit/RepositoryUtilitiesTest.class b/modules/core/test/phpunit/RepositoryUtilitiesTest.class index 82406f69..f28814cb 100644 --- a/modules/core/test/phpunit/RepositoryUtilitiesTest.class +++ b/modules/core/test/phpunit/RepositoryUtilitiesTest.class @@ -29,6 +29,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryTheme.class'); * @version $Revision: 17666 $ */ class RepositoryUtilitiesTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_apis; + public function setUp($x1 = null) { $ret = parent::setUp(); @@ -1454,6 +1457,9 @@ class RepositoryUtilitiesTest extends GalleryTestCase { } class RepositoryUtilitiesTestPhpVm extends GalleryPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_gzinflateExists; + public function __construct($gzinflateExists) { $this->_gzinflateExists = $gzinflateExists; } diff --git a/modules/core/test/phpunit/SessionTest.class b/modules/core/test/phpunit/SessionTest.class index 31d92db2..99ca722b 100644 --- a/modules/core/test/phpunit/SessionTest.class +++ b/modules/core/test/phpunit/SessionTest.class @@ -28,6 +28,12 @@ GalleryCoreApi::requireOnce('modules/core/classes/GallerySession.class'); * @version $Revision: 18136 $ */ class SessionTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_saveStorage; + public $_saveServerVars; + public $_anonymousUserId; + public $_sessionIds; + public function __construct($methodName) { parent::__construct($methodName); } @@ -4459,6 +4465,10 @@ class SessionTest extends GalleryTestCase { } class SessionTestPhpVm extends GalleryPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_randValue; + public $_timeValue; + public function __construct($md5Override = array(), $timeValue = null, $randValue = null) { $_REQUEST['md5Override'] = $md5Override; $this->_randValue = $randValue; @@ -4499,6 +4509,17 @@ class SessionTestPhpVm extends GalleryPhpVm { } class SessionTestStorage { + /* deprecated dynamic properties in php 8.2 */ + public $_query; + public $_data; + public $_options; + public $_addMapEntry; + public $_updateMapEntry; + public $_collisions; + public $_execute; + public $_type; + public $_searchResults; + public function __construct($collisions = 0, $results = array(), $type = 'foo') { $this->_query = array(); $this->_data = array(); @@ -4551,6 +4572,10 @@ class SessionTestStorage { } class SessionTestRecordSet { + /* deprecated dynamic properties in php 8.2 */ + public $_results; + public $_i; + public function __construct($results = array()) { $this->_results = $results; $this->_i = 0; diff --git a/modules/core/test/phpunit/SimpleCallbackTest.class b/modules/core/test/phpunit/SimpleCallbackTest.class index 49083d5c..20757bda 100644 --- a/modules/core/test/phpunit/SimpleCallbackTest.class +++ b/modules/core/test/phpunit/SimpleCallbackTest.class @@ -25,6 +25,12 @@ * @version $Revision: 18157 $ */ class SimpleCallbackTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_users; + public $_tag; + public $_groupNames; + public $_userNames; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/StorageTest.class b/modules/core/test/phpunit/StorageTest.class index 4413c99f..c30ab1cc 100644 --- a/modules/core/test/phpunit/StorageTest.class +++ b/modules/core/test/phpunit/StorageTest.class @@ -35,6 +35,11 @@ class StorageTest extends GalleryTestCase { // results on the non transactional db connection public $_resultsNonTransactional; + /* deprecated dynamic properties in php 8.2 */ + public $_isEmptyAllowedForNotNullColumn; + public $_serverInfo; + public $_nonTransactionalDb; + public function __construct($methodName) { parent::__construct($methodName); } @@ -1798,6 +1803,9 @@ class StorageTestDB { public $transCnt = 1; public $_recordSets; + /* deprecated dynamic properties in php 8.2 */ + public $_results; + public function __construct(&$testCase, $resultsType) { $this->_testCase =& $testCase; $this->_results =& $testCase->$resultsType; @@ -1836,6 +1844,9 @@ class StorageTestDB { class StorageTestRecordSet { public $_rows; + /* deprecated dynamic properties in php 8.2 */ + public $_recordCount; + public function __construct($rows = array()) { $this->_rows = $rows; $this->_recordCount = count($rows); diff --git a/modules/core/test/phpunit/SvnAuditTest.class b/modules/core/test/phpunit/SvnAuditTest.class index 80f757fe..d38a2f89 100644 --- a/modules/core/test/phpunit/SvnAuditTest.class +++ b/modules/core/test/phpunit/SvnAuditTest.class @@ -25,6 +25,12 @@ * @version $Revision: 17580 $ */ class SvnAuditTest extends CodeAuditTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_exceptions; + public $_shouldHalt; + public $_baseDir; + public $_errorCount; + public function __construct($methodName) { global $gallery; @@ -107,11 +113,11 @@ class SvnAuditTest extends CodeAuditTestCase { public function checkFile($fileName, $buffer) { $slash = $this->_platform->getDirectorySeparator(); $base = basename($fileName); - $propsFile = dirname($fileName) . "${slash}.svn${slash}props${slash}${base}.svn-work"; + $propsFile = dirname($fileName) . "{$slash}.svn{$slash}props{$slash}{$base}.svn-work"; if (!$this->_platform->file_exists($propsFile)) { // svn 1.4.x does not write .svn-work unless local prop changes are made - $propsFile = dirname($fileName) . "${slash}.svn${slash}prop-base${slash}${base}.svn-base"; + $propsFile = dirname($fileName) . "{$slash}.svn{$slash}prop-base{$slash}{$base}.svn-base"; } $g2Path = str_replace($this->_baseDir . '/', '', $fileName); diff --git a/modules/core/test/phpunit/TemplateAdapterTest.class b/modules/core/test/phpunit/TemplateAdapterTest.class index 4ed2ed26..f72d2252 100644 --- a/modules/core/test/phpunit/TemplateAdapterTest.class +++ b/modules/core/test/phpunit/TemplateAdapterTest.class @@ -32,6 +32,11 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryTemplateAdapter.class') * @version $Revision: 20957 $ */ class TemplateAdapterTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_mockUrlGenerator; + public $_mockSmarty; + public $_templateAdapter; + public function GalleryTemplateAdapterTest($methodName) { parent::__construct($methodName); } @@ -1034,6 +1039,9 @@ class TemplateAdapterMockTheme { class TemplateAdapterMockSmarty { public $_includes = array(); + /* deprecated dynamic properties in php 8.2 */ + public $_tpl_vars; + public function _smarty_include($params) { $this->_includes[] = $params; } diff --git a/modules/core/test/phpunit/TemplateAuditTest.class b/modules/core/test/phpunit/TemplateAuditTest.class index f50ac67b..ee13da5f 100644 --- a/modules/core/test/phpunit/TemplateAuditTest.class +++ b/modules/core/test/phpunit/TemplateAuditTest.class @@ -26,6 +26,19 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryTemplate.class'); * @version $Revision: 20940 $ */ class TemplateAuditTest extends CodeAuditTestCase { + /* deprecated dynamic properties */ + public $_shouldHalt; + public $_baseDir; + public $_lineEnding; + public $_revisionPattern; + public $_revisionPlaceHolder; + public $_headerPattern; + public $_headerLines; + public $_expectedHeaderLines; + public $_exceptions; + public $_exception; + public $_errorCount; + public function __construct($methodName) { global $gallery; diff --git a/modules/core/test/phpunit/TemplateTest.class b/modules/core/test/phpunit/TemplateTest.class index 659830be..cbe616b6 100644 --- a/modules/core/test/phpunit/TemplateTest.class +++ b/modules/core/test/phpunit/TemplateTest.class @@ -26,6 +26,12 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryTemplate.class'); * @version $Revision: 17950 $ */ class TemplateTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_mockSmarty; + public $_baseDirOverride; + public $_origPlatform; + public $_mockPlatform; + public function __construct($methodName) { parent::__construct($methodName); } @@ -564,6 +570,9 @@ class TemplateTest extends GalleryTestCase { } class TemplateTestMockPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_returns; + public function set($func, $filename, $return) { $this->_returns[$func][$filename] = $return; } @@ -582,6 +591,10 @@ class TemplateTestMockPlatform { } class TemplateTestMockSmarty { + /* deprecated dynamic properties in php 8.2 */ + public $template_dir; + public $_tpl_vars; + public function __construct() { $this->template_dir = '/legal/path'; $this->_tpl_vars = array( diff --git a/modules/core/test/phpunit/ThemeTest.class b/modules/core/test/phpunit/ThemeTest.class index 59a45c74..d8ce9815 100644 --- a/modules/core/test/phpunit/ThemeTest.class +++ b/modules/core/test/phpunit/ThemeTest.class @@ -27,6 +27,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryTemplate.class'); * @version $Revision: 17580 $ */ class ThemeTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_theme; + public function __construct($methodName) { parent::__construct($methodName); } @@ -661,6 +664,9 @@ class ThemeTest extends GalleryTestCase { * Test theme */ class ThemeTestTheme extends GalleryTheme { + /* deprecated dynamic properties in php 8.2 */ + public $_preloadedBlocks; + public function __construct() { global $gallery; @@ -690,6 +696,9 @@ class ThemeTestView extends GalleryView {} * Test platform for this test */ class ThemeTestPlatform extends GalleryPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_list; + public function opendir($path) { if (strpos($path, 'themes/') !== false) { $this->_list = array(); diff --git a/modules/core/test/phpunit/UrlGeneratorTest.class b/modules/core/test/phpunit/UrlGeneratorTest.class index a962ea13..cf9f07cc 100644 --- a/modules/core/test/phpunit/UrlGeneratorTest.class +++ b/modules/core/test/phpunit/UrlGeneratorTest.class @@ -28,6 +28,9 @@ class UrlGeneratorTest extends GalleryTestCase { public $_urlGenerator; public $_savedGet; + /* deprecated dynamic properties in php 8.2 */ + public $_origEmbed; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/core/test/phpunit/UserHelperTest.class b/modules/core/test/phpunit/UserHelperTest.class index 95bce1b6..db074e9a 100644 --- a/modules/core/test/phpunit/UserHelperTest.class +++ b/modules/core/test/phpunit/UserHelperTest.class @@ -27,6 +27,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/helpers/GalleryUserHelper_medi * @version $Revision: 17608 $ */ class UserHelperTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_originalStorage; + public function setUp($x1 = null) { global $gallery; @@ -484,6 +487,10 @@ class UserHelperTestMockStorage { * Fake search results class, pretends to extend GallerySearchResults */ class UserHelperTestMockStorageFakeResults { + /* deprecated dynamic properties in php 8.2 */ + public $_count; + public $_lastAttempt; + public function __construct($count, $lastAttempt = null) { $this->_count = $count; $this->_lastAttempt = $lastAttempt; @@ -532,6 +539,10 @@ class UserHelperTestPhpVm { * Mock Session */ class UserHelperTestSession { + /* deprecated dynamic properties in php 8.2 */ + public $_regenerateWasCalled; + public $_sessionData; + public function __construct() { $this->_regenerateWasCalled = false; } diff --git a/modules/core/test/phpunit/UserLoginControllerTest.class b/modules/core/test/phpunit/UserLoginControllerTest.class index 7a204039..db824eb5 100644 --- a/modules/core/test/phpunit/UserLoginControllerTest.class +++ b/modules/core/test/phpunit/UserLoginControllerTest.class @@ -28,6 +28,12 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryTemplate.class'); * @version $Revision: 17924 $ */ class UserLoginControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_exitCalls; + public $_headers; + public $_validationLevel; + public $_originalLoginRedirect; + public function __construct($methodName) { parent::__construct($methodName, 'core.UserLogin'); } @@ -673,6 +679,10 @@ class UserLoginControllerTest extends GalleryControllerTestCase { * Mock ValidationPlugin */ class UserLoginControllerTestPlugin extends GalleryValidationPlugin { + /* deprecated dynamic properties in php 8.2 */ + public $_errors; + public $_continue; + public function setContinue($continue) { $this->_continue = $continue; } @@ -690,6 +700,11 @@ class UserLoginControllerTestPlugin extends GalleryValidationPlugin { * Mock session */ class UserLoginControllerTestSession { + /* deprecated dynamic properties in php 8.2 */ + public $_sessionData; + public $_regenerateWasCalled; + public $_hash; + public function __construct() { $this->_regenerateWasCalled = false; $this->_hash = array(); @@ -740,6 +755,10 @@ class UserLoginControllerTestSession { * Mock PHP VM */ class UserLoginTestPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_test; + public $_headersSent; + public function __construct(&$test, $headersSent = false) { $this->_test =& $test; $this->_headersSent = $headersSent; diff --git a/modules/core/test/phpunit/UserPreferencesControllerTest.class b/modules/core/test/phpunit/UserPreferencesControllerTest.class index 95d6b1b8..f77a1597 100644 --- a/modules/core/test/phpunit/UserPreferencesControllerTest.class +++ b/modules/core/test/phpunit/UserPreferencesControllerTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17627 $ */ class UserPreferencesControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_currentLanguage; + public function __construct($methodName) { parent::__construct($methodName, 'core.UserPreferences'); } diff --git a/modules/core/test/phpunit/UserRecoverPasswordAdminControllerTest.class b/modules/core/test/phpunit/UserRecoverPasswordAdminControllerTest.class index 35d2057c..0c61ca6c 100644 --- a/modules/core/test/phpunit/UserRecoverPasswordAdminControllerTest.class +++ b/modules/core/test/phpunit/UserRecoverPasswordAdminControllerTest.class @@ -25,6 +25,10 @@ * @version $Revision: 17580 $ */ class UserRecoverPasswordAdminControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_admin; + public $_savedAdminPassword; + public function __construct($methodName) { parent::__construct($methodName, 'core.UserRecoverPasswordAdmin'); } @@ -431,6 +435,10 @@ class UserRecoverPasswordAdminControllerTest extends GalleryControllerTestCase { } class UserRecoverPasswordAdminDummyPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_authFileValue; + public $_platform; + public function __construct($platform, $authFileValue) { $this->_platform = $platform; $this->_authFileValue = $authFileValue; diff --git a/modules/core/test/phpunit/UserRecoverPasswordConfirmControllerTest.class b/modules/core/test/phpunit/UserRecoverPasswordConfirmControllerTest.class index b8b28952..ee376b8c 100644 --- a/modules/core/test/phpunit/UserRecoverPasswordConfirmControllerTest.class +++ b/modules/core/test/phpunit/UserRecoverPasswordConfirmControllerTest.class @@ -25,6 +25,9 @@ * @version $Revision: 17580 $ */ class UserRecoverPasswordConfirmControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_hashedPassword; + public function __construct($methodName) { parent::__construct($methodName, 'core.UserRecoverPasswordConfirm'); } diff --git a/modules/core/test/phpunit/UserRecoverPasswordControllerTest.class b/modules/core/test/phpunit/UserRecoverPasswordControllerTest.class index e211e4f5..d3eb958c 100644 --- a/modules/core/test/phpunit/UserRecoverPasswordControllerTest.class +++ b/modules/core/test/phpunit/UserRecoverPasswordControllerTest.class @@ -27,6 +27,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/helpers/UserRecoverPasswordHel * @version $Revision: 17580 $ */ class UserRecoverPasswordControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_authData; + public function __construct($methodName) { parent::__construct($methodName, 'core.UserRecoverPassword'); } @@ -719,6 +722,10 @@ class UserRecoverPasswordControllerTest extends GalleryControllerTestCase { * Mock ValidationPlugin */ class UserRecoverPasswordControllerTestPlugin extends GalleryValidationPlugin { + /* deprecated dynamic properties in php 8.2 */ + public $_errors; + public $_continue; + public function setContinue($continue) { $this->_continue = $continue; } @@ -737,6 +744,9 @@ class UserRecoverPasswordControllerTestPlugin extends GalleryValidationPlugin { * @subpackage PHPUnit */ class RecoverDummyPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_platform; + public function __construct($platform) { $this->_platform = $platform; } @@ -826,6 +836,9 @@ class RecoverDummyPlatform { } class RecoverPasswordControllerPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_md5; + public function setMd5($string) { $this->_md5 = $string; } diff --git a/modules/core/test/phpunit/UtilitiesTest.class b/modules/core/test/phpunit/UtilitiesTest.class index fb201157..935bb490 100644 --- a/modules/core/test/phpunit/UtilitiesTest.class +++ b/modules/core/test/phpunit/UtilitiesTest.class @@ -25,6 +25,12 @@ * @version $Revision: 17580 $ */ class UtilitiesTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_saveCookie; + public $_saveServerHttpCookie; + public $_mkdir; + public $_responseHeaders; + public function __construct($methodName) { parent::__construct($methodName); } @@ -2546,6 +2552,9 @@ class UtilitiesTest extends GalleryTestCase { } class UtilitiesTestPlatform { + /* deprecatced dynamic properties in php 8.2 */ + public $_testCase; + public function __construct(&$testCase) { $this->_testCase =& $testCase; } diff --git a/modules/core/test/phpunit/ViewTest.class b/modules/core/test/phpunit/ViewTest.class index 7207e52c..e24dd490 100644 --- a/modules/core/test/phpunit/ViewTest.class +++ b/modules/core/test/phpunit/ViewTest.class @@ -1176,6 +1176,12 @@ class ViewTestThemeId2Theme { } class ViewTestEventListener { + /* deprecated dynamic properties in php 8.2 */ + public $_themeId; + public $_params; + public $_testCase; + public $_itemId; + public function __construct($testCase, $themeId, $params, $itemId) { $this->_themeId = $themeId; $this->_params = $params; diff --git a/modules/core/test/phpunit/WebTest.class b/modules/core/test/phpunit/WebTest.class index 4232b6be..3efeb584 100644 --- a/modules/core/test/phpunit/WebTest.class +++ b/modules/core/test/phpunit/WebTest.class @@ -27,6 +27,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryTheme.class'); * @version $Revision: 20940 $ */ class WebTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_outputFile; + public function __construct($methodName) { parent::__construct($methodName); } @@ -569,6 +572,11 @@ class WebTest extends GalleryTestCase { * Mock platform */ class WebTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_fileBuffer; + public $_testCase; + public $_readBuffer; + public function __construct(&$testCase) { $this->_testCase =& $testCase; $this->_readBuffer = array(); diff --git a/modules/dynamicalbum/UpdatesAlbum.inc b/modules/dynamicalbum/UpdatesAlbum.inc index 1ebdfe52..efde3d6a 100644 --- a/modules/dynamicalbum/UpdatesAlbum.inc +++ b/modules/dynamicalbum/UpdatesAlbum.inc @@ -27,6 +27,13 @@ */ class UpdatesAlbumView extends GalleryView { + /* deprecated dynamic properties in php 8.2 */ + var $_view; + var $_title; + var $_itemType; + var $_viewDescription; + var $_param; + function __construct() { global $gallery; $this->_view = 'dynamicalbum.UpdatesAlbum'; diff --git a/modules/dynamicalbum/test/phpunit/DynamicAlbumSiteAdminControllerTest.class b/modules/dynamicalbum/test/phpunit/DynamicAlbumSiteAdminControllerTest.class index 1ef1d7d0..eae24f4d 100644 --- a/modules/dynamicalbum/test/phpunit/DynamicAlbumSiteAdminControllerTest.class +++ b/modules/dynamicalbum/test/phpunit/DynamicAlbumSiteAdminControllerTest.class @@ -27,6 +27,9 @@ * @version $Revision: 17580 $ */ class DynamicAlbumSiteAdminControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_defaultThemeId; + public function __construct($methodName) { parent::__construct($methodName, 'dynamicalbum.DynamicAlbumSiteAdmin'); } diff --git a/modules/dynamicalbum/test/phpunit/DynamicAlbumTest.class b/modules/dynamicalbum/test/phpunit/DynamicAlbumTest.class index 4bbc7b52..4b09724f 100644 --- a/modules/dynamicalbum/test/phpunit/DynamicAlbumTest.class +++ b/modules/dynamicalbum/test/phpunit/DynamicAlbumTest.class @@ -27,6 +27,12 @@ * @version $Revision: 17580 $ */ class DynamicAlbumTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_updatesView; + public $_popularView; + public $_randomView; + public $_class; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/exif/test/phpunit/ExifExtractorTest.class b/modules/exif/test/phpunit/ExifExtractorTest.class index 834bd70c..770cc2b9 100644 --- a/modules/exif/test/phpunit/ExifExtractorTest.class +++ b/modules/exif/test/phpunit/ExifExtractorTest.class @@ -28,6 +28,10 @@ * @version $Revision: 17580 $ */ class ExifExtractorTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_photoIds; + public $_exif; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/exif/test/phpunit/ExifHelperTest.class b/modules/exif/test/phpunit/ExifHelperTest.class index 0991bb69..8905c81f 100644 --- a/modules/exif/test/phpunit/ExifHelperTest.class +++ b/modules/exif/test/phpunit/ExifHelperTest.class @@ -49,6 +49,9 @@ GalleryCoreApi::requireOnce('modules/exif/classes/ExifHelper.class'); class ExifHelperTest extends GalleryTestCase { public $_save = array(); + /* deprecated dynamic properties in php 8.2 */ + public $_saveFormat; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/ffmpeg/test/phpunit/AdminFfmpegControllerTest.class b/modules/ffmpeg/test/phpunit/AdminFfmpegControllerTest.class index 70fe5d6a..ae6ac050 100644 --- a/modules/ffmpeg/test/phpunit/AdminFfmpegControllerTest.class +++ b/modules/ffmpeg/test/phpunit/AdminFfmpegControllerTest.class @@ -26,6 +26,11 @@ * @version $Revision: 17614 $ */ class AdminFfmpegControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public array $_thumbnailOps; + public $_movie; + public $_thumbnail; + public function __construct($methodName) { parent::__construct($methodName, 'ffmpeg.AdminFfmpeg'); } diff --git a/modules/ffmpeg/test/phpunit/FfmpegToolkitTest.class b/modules/ffmpeg/test/phpunit/FfmpegToolkitTest.class index 85e0f4bf..289d0fe2 100644 --- a/modules/ffmpeg/test/phpunit/FfmpegToolkitTest.class +++ b/modules/ffmpeg/test/phpunit/FfmpegToolkitTest.class @@ -29,6 +29,9 @@ GalleryCoreApi::requireOnce('modules/ffmpeg/classes/FfmpegToolkit.class'); * @version $Revision: 17614 $ */ class FfmpegToolkitTest extends GalleryTestCase { + /* deprecated dynamic properties php 8.2 */ + public $_chmodWasCalled; + public function __construct($methodName) { parent::__construct($methodName); } @@ -649,6 +652,10 @@ class FfmpegToolkitTest extends GalleryTestCase { * @subpackage PHPUnit */ class FfmpegToolkitTestPlatform { + /* deprecated dynamic properties in ph 8.2 */ + public $_test; + public $_ffmpegPath; + public function init(&$test) { $this->_test =& $test; list($ret, $this->_ffmpegPath) = GalleryCoreApi::getPluginParameter( diff --git a/modules/gd/test/phpunit/GdToolkitTest.class b/modules/gd/test/phpunit/GdToolkitTest.class index 0f9ee297..63e5b8c9 100644 --- a/modules/gd/test/phpunit/GdToolkitTest.class +++ b/modules/gd/test/phpunit/GdToolkitTest.class @@ -36,6 +36,9 @@ class GdToolkitTest extends GalleryTestCase { public $_oldBase; + /* deprecated dynamic properties in php 8.2 */ + public $_gdFunctionality; + public function __construct($methodName) { parent::__construct($methodName); diff --git a/modules/gd/test/phpunit/TestGdFunctionality.class b/modules/gd/test/phpunit/TestGdFunctionality.class index 2a0466f9..c304047e 100644 --- a/modules/gd/test/phpunit/TestGdFunctionality.class +++ b/modules/gd/test/phpunit/TestGdFunctionality.class @@ -38,6 +38,9 @@ class TestGdFunctionality { public $_resources; public $_outputFiles; + /* deprecated dynamic properties in php 8.2 */ + public $_counter; + public function __construct() { } diff --git a/modules/icons/test/phpunit/IconsTest.class b/modules/icons/test/phpunit/IconsTest.class index 7bdc8cc3..5b7fbc2c 100644 --- a/modules/icons/test/phpunit/IconsTest.class +++ b/modules/icons/test/phpunit/IconsTest.class @@ -29,6 +29,10 @@ GalleryCoreApi::requireOnce('modules/icons/classes/IconsImpl.class'); * @version $Revision: 17580 $ */ class IconsTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_icons; + public $_saveRtl; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/imagemagick/test/phpunit/AdminImageMagickControllerTest.class b/modules/imagemagick/test/phpunit/AdminImageMagickControllerTest.class index 81ddeaa2..4a13378c 100644 --- a/modules/imagemagick/test/phpunit/AdminImageMagickControllerTest.class +++ b/modules/imagemagick/test/phpunit/AdminImageMagickControllerTest.class @@ -25,6 +25,11 @@ * @version $Revision: 17580 $ */ class AdminImageMagickControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_cmykSupport; + public $_ranIdentify; + public $_slash; + public function __construct($methodName) { parent::__construct($methodName, 'imagemagick.AdminImageMagick'); } @@ -149,7 +154,7 @@ class AdminImageMagickControllerTest extends GalleryControllerTestCase { // Use valid inputs GalleryUtilities::putRequestVariable('form[action][save]', 1); - GalleryUtilities::putRequestVariable('form[path]', "${slash}validPathBadBinaries${slash}"); + GalleryUtilities::putRequestVariable('form[path]', "{$slash}validPathBadBinaries{$slash}"); GalleryUtilities::putRequestVariable('form[jpegQuality]', '12'); GalleryUtilities::putRequestVariable('form[cmykSupport]', $this->_cmykSupport); @@ -174,7 +179,7 @@ class AdminImageMagickControllerTest extends GalleryControllerTestCase { // Use valid inputs GalleryUtilities::putRequestVariable('form[action][save]', 1); - GalleryUtilities::putRequestVariable('form[path]', "${slash}invalidPath${slash}"); + GalleryUtilities::putRequestVariable('form[path]', "{$slash}invalidPath{$slash}"); GalleryUtilities::putRequestVariable('form[jpegQuality]', '12'); GalleryUtilities::putRequestVariable('form[cmykSupport]', $this->_cmykSupport); @@ -224,7 +229,7 @@ class AdminImageMagickControllerTest extends GalleryControllerTestCase { // Use valid inputs GalleryUtilities::putRequestVariable('form[action][save]', 1); - GalleryUtilities::putRequestVariable('form[path]', "${slash}vulnerablePath${slash}"); + GalleryUtilities::putRequestVariable('form[path]', "{$slash}vulnerablePath{$slash}"); GalleryUtilities::putRequestVariable('form[jpegQuality]', '80'); GalleryUtilities::putRequestVariable('form[cmykSupport]', $this->_cmykSupport); @@ -302,6 +307,10 @@ class AdminImageMagickControllerTest extends GalleryControllerTestCase { * @subpackage PHPUnit */ class AdminImageMagickControllerTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_unitTest; + public $_platform; + public function __construct($originalPlatform, &$unitTest) { $this->_platform = $originalPlatform; $this->_unitTest =& $unitTest; @@ -311,16 +320,16 @@ class AdminImageMagickControllerTestPlatform { $slash = $this->getDirectorySeparator(); switch ($path) { - case "${slash}validPath": - case "${slash}validPath${slash}": - case "${slash}validPath${slash}identify": - case "${slash}validPath${slash}convert": - case "${slash}vulnerablePath": - case "${slash}vulnerablePath${slash}": - case "${slash}vulnerablePath${slash}identify": - case "${slash}vulnerablePath${slash}convert": - case "${slash}validPathBadBinaries": - case "${slash}validPathBadBinaries${slash}": + case "{$slash}validPath": + case "{$slash}validPath{$slash}": + case "{$slash}validPath{$slash}identify": + case "{$slash}validPath{$slash}convert": + case "{$slash}vulnerablePath": + case "{$slash}vulnerablePath{$slash}": + case "{$slash}vulnerablePath{$slash}identify": + case "{$slash}vulnerablePath{$slash}convert": + case "{$slash}validPathBadBinaries": + case "{$slash}validPathBadBinaries{$slash}": return true; } @@ -331,9 +340,9 @@ class AdminImageMagickControllerTestPlatform { $slash = $this->getDirectorySeparator(); switch ($dir) { - case "${slash}validPath${slash}": - case "${slash}vulnerablePath${slash}": - case "${slash}validPathBadBinaries${slash}": + case "{$slash}validPath{$slash}": + case "{$slash}vulnerablePath{$slash}": + case "{$slash}validPathBadBinaries{$slash}": return true; } @@ -364,7 +373,7 @@ class AdminImageMagickControllerTestPlatform { $slash = $this->getDirectorySeparator(); switch ($args[0][0]) { - case "${slash}validPath${slash}identify": + case "{$slash}validPath{$slash}identify": $this->_unitTest->_ranIdentify++; return array( @@ -372,7 +381,7 @@ class AdminImageMagickControllerTestPlatform { empty($args[0][1]) ? array('Version: ImageMagick 6.3.3-5') : array('test.gif GIF 50x50+0+0 PseudoClass 8c 8-bit 232.0 0.000u 0:01'), ); - case "${slash}vulnerablePath${slash}identify": + case "{$slash}vulnerablePath{$slash}identify": $this->_unitTest->_ranIdentify++; return array( @@ -380,12 +389,12 @@ class AdminImageMagickControllerTestPlatform { empty($args[0][1]) ? array('Version: ImageMagick 6.1.3') : array('test.gif GIF 50x50+0+0 PseudoClass 8c 8-bit 232.0 0.000u 0:01'), ); - case "${slash}validPath${slash}convert": - case "${slash}vulnerablePath${slash}convert": + case "{$slash}validPath{$slash}convert": + case "{$slash}vulnerablePath{$slash}convert": return array(1, array()); - case "${slash}validPath${slash}composite": - case "${slash}vulnerablePath${slash}composite": + case "{$slash}validPath{$slash}composite": + case "{$slash}vulnerablePath{$slash}composite": return array(1, array()); default: diff --git a/modules/imagemagick/test/phpunit/ImageMagickToolkitTest.class b/modules/imagemagick/test/phpunit/ImageMagickToolkitTest.class index 2b18f57a..d5dc05fb 100644 --- a/modules/imagemagick/test/phpunit/ImageMagickToolkitTest.class +++ b/modules/imagemagick/test/phpunit/ImageMagickToolkitTest.class @@ -33,6 +33,9 @@ class ImageMagickToolkitTest extends GalleryTestCase // The current environment array item we are processing public $_currentEnvironment = array(); + /* deprecated dynamic properties in php 8.2 */ + public $_chmodWasCalled; + /* * Information about files in our pseudo-platform. * Better would be to store the files information in the Platform, but @@ -1416,6 +1419,12 @@ class ImageMagickToolkitTestPlatform public $_environment = array(); public $_files; + /* deprecated dynamic properties in php 8.2 */ + public $_counter; + public $_copyOk; + public $_platform; + public $_test; + public function __construct($originalPlatform, &$files, &$test) { $this->_platform = $originalPlatform; diff --git a/modules/itemadd/ItemAddFromServer.inc b/modules/itemadd/ItemAddFromServer.inc index de94fb02..4f25074d 100644 --- a/modules/itemadd/ItemAddFromServer.inc +++ b/modules/itemadd/ItemAddFromServer.inc @@ -27,6 +27,21 @@ */ class ItemAddFromServer extends ItemAddPlugin { + /* deprecated dynamic properties in php 8.2 */ + var $_platform; + var $_dirSep; + var $_templateAdapter; + var $_storage; + var $_addController; + var $_addingItemsMessage; + var $_fileCountMessage; + var $_totalItems; + var $_lastPostProcessed; + var $_addedItems; + var $_progressBatch; + var $_processBatch; + var $_localServerDirList; + /** * @see ItemAddPlugin::isAppropriate */ diff --git a/modules/itemadd/test/phpunit/ItemAddFromServerTest.class b/modules/itemadd/test/phpunit/ItemAddFromServerTest.class index 436c2b25..40ee9018 100644 --- a/modules/itemadd/test/phpunit/ItemAddFromServerTest.class +++ b/modules/itemadd/test/phpunit/ItemAddFromServerTest.class @@ -26,6 +26,14 @@ * @version $Revision: 18162 $ */ class ItemAddFromServerTest extends ItemAddPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_addController; + public $_rootAlbum; + public $_lockId; + public $_symlinkAllowedPlatform; + public $_symlinkDisallowedPlatform; + public $_baseDir; + public function __construct($methodName) { parent::__construct($methodName, 'itemadd', 'ItemAddFromServer'); } @@ -716,6 +724,13 @@ class ItemAddFromServerTest extends ItemAddPluginTestCase { * Test platform */ class ItemAddFromServerTestPlatform extends GalleryPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_delegate; + public $_dirSep; + public $_symlinkSupported; + public $_baseDir; + public $_baseDirRecursive; + public function __construct($delegate, $symlinkSupported) { $this->_delegate = $delegate; $dirSep = $this->_dirSep = $delegate->getDirectorySeparator(); diff --git a/modules/itemadd/test/phpunit/ItemAddFromWebTest.class b/modules/itemadd/test/phpunit/ItemAddFromWebTest.class index 55e539b7..76ff85b5 100644 --- a/modules/itemadd/test/phpunit/ItemAddFromWebTest.class +++ b/modules/itemadd/test/phpunit/ItemAddFromWebTest.class @@ -37,6 +37,16 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryUnknownItem.class'); * @version $Revision: 20940 $ */ class ItemAddFromWebTest extends ItemAddPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_addController; + public $_outputFile; + public $_lockIds; + public $_session; + public $_saveRecentUrls; + public $_photo; + public $_movie; + public $_audio; + public function __construct($methodName) { parent::__construct($methodName, 'itemadd', 'ItemAddFromWeb'); } @@ -831,6 +841,10 @@ class ItemAddFromWebTest extends ItemAddPluginTestCase { * @subpackage PHPUnit */ class ItemAddFromWebTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_readBuffer; + public $_testCase; + public function __construct(&$testCase) { $this->_testCase = $testCase; } diff --git a/modules/itemadd/test/phpunit/ItemAddSiteAdminControllerTest.class b/modules/itemadd/test/phpunit/ItemAddSiteAdminControllerTest.class index 273c4413..7eaedd5d 100644 --- a/modules/itemadd/test/phpunit/ItemAddSiteAdminControllerTest.class +++ b/modules/itemadd/test/phpunit/ItemAddSiteAdminControllerTest.class @@ -592,6 +592,9 @@ class ItemAddSiteAdminControllerTest extends GalleryControllerTestCase { * @subpackage PHPUnit */ class ItemAddSiteAdminControllerTestPhpVm extends GalleryPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_iniVal; + public function __construct($iniVal) { $this->_iniVal = $iniVal; } diff --git a/modules/jpegtran/test/phpunit/JpegtranToolkitTest.class b/modules/jpegtran/test/phpunit/JpegtranToolkitTest.class index 6806bcfd..89e11654 100644 --- a/modules/jpegtran/test/phpunit/JpegtranToolkitTest.class +++ b/modules/jpegtran/test/phpunit/JpegtranToolkitTest.class @@ -29,6 +29,10 @@ GalleryCoreApi::requireOnce('modules/jpegtran/classes/JpegtranToolkit.class'); * @version $Revision: 17580 $ */ class JpegtranToolkitTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_chmodWasCalled; + public $_jpegtranPath; + public function __construct($methodName) { parent::__construct($methodName); } @@ -386,6 +390,13 @@ class JpegtranToolkitTest extends GalleryTestCase { * @subpackage PHPUnit */ class JpegtranToolkitTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_envId; + public $_test; + public $_testFile; + public $_jpegtranPath; + public $_chdirCount; + public function __construct(&$test, $jpegtranPath) { $this->_test =& $test; $this->_testFile = dirname(dirname(__DIR__)) . '/data/test.jpg'; diff --git a/modules/keyalbum/test/phpunit/KeywordAlbumCallbacksTest.class b/modules/keyalbum/test/phpunit/KeywordAlbumCallbacksTest.class index 5277a4f9..3f6810c2 100644 --- a/modules/keyalbum/test/phpunit/KeywordAlbumCallbacksTest.class +++ b/modules/keyalbum/test/phpunit/KeywordAlbumCallbacksTest.class @@ -29,6 +29,9 @@ GalleryCoreApi::requireOnce('modules/keyalbum/Callbacks.inc'); * @version $Revision: 17580 $ */ class KeywordAlbumCallbacksTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_originalGuestUserId; + public function __construct($methodName) { parent::__construct($methodName); } @@ -766,6 +769,10 @@ class KeywordAlbumCallbacksTest extends GalleryTestCase { * Mock storage for callbacks tests. */ class KeywordAlbumCallbacksTestStorage { + /* deprecated dynamic properties in php 8.2 */ + public $_storage; + public $_queries; + public function __construct($storage, $queries) { // Avoid weird reference thing in php4 that makes _extras->_gs point to mock storage $storage->_extras = null; diff --git a/modules/keyalbum/test/phpunit/KeywordAlbumSiteAdminControllerTest.class b/modules/keyalbum/test/phpunit/KeywordAlbumSiteAdminControllerTest.class index 982d2e8a..0417e650 100644 --- a/modules/keyalbum/test/phpunit/KeywordAlbumSiteAdminControllerTest.class +++ b/modules/keyalbum/test/phpunit/KeywordAlbumSiteAdminControllerTest.class @@ -27,6 +27,9 @@ * @version $Revision: 17580 $ */ class KeywordAlbumSiteAdminControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_defaultThemeId; + public function __construct($methodName) { parent::__construct($methodName, 'keyalbum.KeywordAlbumSiteAdmin'); } diff --git a/modules/linkitem/test/phpunit/ItemAddLinkItemTest.class b/modules/linkitem/test/phpunit/ItemAddLinkItemTest.class index 9ba3f196..654eee0e 100644 --- a/modules/linkitem/test/phpunit/ItemAddLinkItemTest.class +++ b/modules/linkitem/test/phpunit/ItemAddLinkItemTest.class @@ -26,6 +26,10 @@ * @version $Revision: 17580 $ */ class ItemAddLinkItemTest extends ItemAddPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_addController; + public $_lockId; + public function __construct($methodName) { parent::__construct($methodName, 'linkitem', 'ItemAddLinkItem'); } diff --git a/modules/linkitem/test/phpunit/LinkItemOptionTest.class b/modules/linkitem/test/phpunit/LinkItemOptionTest.class index 75a64ba0..c4b65dcf 100644 --- a/modules/linkitem/test/phpunit/LinkItemOptionTest.class +++ b/modules/linkitem/test/phpunit/LinkItemOptionTest.class @@ -28,6 +28,9 @@ GalleryCoreApi::requireOnce('lib/tools/phpunit/ItemEditOptionTestCase.class'); * @version $Revision: 17580 $ */ class LinkItemOptionTest extends ItemEditOptionTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_link; + public function __construct($methodName) { parent::__construct($methodName, 'linkitem', 'LinkItemOption'); } diff --git a/modules/linkitem/test/phpunit/LinkItemTest.class b/modules/linkitem/test/phpunit/LinkItemTest.class index a4332334..5b7308cf 100644 --- a/modules/linkitem/test/phpunit/LinkItemTest.class +++ b/modules/linkitem/test/phpunit/LinkItemTest.class @@ -26,6 +26,10 @@ * @version $Revision: 17580 $ */ class LinkItemTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_lockId; + public $_link; + public function setUp($x1 = null) { $ret = parent::setUp(); diff --git a/modules/netpbm/test/phpunit/AdminNetPbmControllerTest.class b/modules/netpbm/test/phpunit/AdminNetPbmControllerTest.class index ef5bd663..60426cca 100644 --- a/modules/netpbm/test/phpunit/AdminNetPbmControllerTest.class +++ b/modules/netpbm/test/phpunit/AdminNetPbmControllerTest.class @@ -257,6 +257,9 @@ class AdminNetPbmControllerTest extends GalleryControllerTestCase { * @subpackage PHPUnit */ class AdminNetPbmControllerTestPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_platform; + public function __construct($originalPlatform) { $this->_platform = $originalPlatform; } diff --git a/modules/netpbm/test/phpunit/NetPbmToolkitTest.class b/modules/netpbm/test/phpunit/NetPbmToolkitTest.class index 6508bf58..6d071802 100644 --- a/modules/netpbm/test/phpunit/NetPbmToolkitTest.class +++ b/modules/netpbm/test/phpunit/NetPbmToolkitTest.class @@ -31,6 +31,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryPlatform/WinNtPlatform. * @version $Revision: 17580 $ */ class NetPbmToolkitTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_chmodWasCalled; + public function __construct($methodName) { parent::__construct($methodName); } @@ -1085,6 +1088,13 @@ class NetPbmToolkitTest extends GalleryTestCase { * @subpackage PHPUnit */ class NetPbmToolkitTestPlatform extends WinNtPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_counter; + public $_platform; + public $_test; + public $_netPbmPath; + public $_jheadPath; + public function __construct($platform, &$test) { $this->_platform = $platform; $this->_test =& $test; diff --git a/modules/newitems/test/phpunit/NewItemsSiteAdminControllerTest.class b/modules/newitems/test/phpunit/NewItemsSiteAdminControllerTest.class index 1516177d..11fcc2ac 100644 --- a/modules/newitems/test/phpunit/NewItemsSiteAdminControllerTest.class +++ b/modules/newitems/test/phpunit/NewItemsSiteAdminControllerTest.class @@ -29,6 +29,9 @@ GalleryCoreApi::requireOnce('modules/newitems/classes/NewItemsHelper.class'); * @version $Revision: 17580 $ */ class NewItemsSiteAdminControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_newItemSortIds; + public function __construct($methodName) { parent::__construct($methodName, 'newitems.NewItemsSiteAdmin'); } diff --git a/modules/rating/test/phpunit/RatingCallbacksTest.class b/modules/rating/test/phpunit/RatingCallbacksTest.class index 400433d3..80528a29 100644 --- a/modules/rating/test/phpunit/RatingCallbacksTest.class +++ b/modules/rating/test/phpunit/RatingCallbacksTest.class @@ -29,6 +29,9 @@ GalleryCoreApi::requireOnce('modules/rating/Callbacks.inc'); * @version $Revision: 17580 $ */ class RatingCallbacksTest extends GalleryTestCase { + /* deprecated dynamic properties in ph 8.2 */ + public $_authToken; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/rating/test/phpunit/RatingHelperTest.class b/modules/rating/test/phpunit/RatingHelperTest.class index 0682a1c1..cbcaa69c 100644 --- a/modules/rating/test/phpunit/RatingHelperTest.class +++ b/modules/rating/test/phpunit/RatingHelperTest.class @@ -30,6 +30,9 @@ GalleryCoreApi::requireOnce('modules/rating/classes/RatingHelper.class'); * @version $Revision: 17580 $ */ class RatingHelperTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_users; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/rating/test/phpunit/RatingOptionTest.class b/modules/rating/test/phpunit/RatingOptionTest.class index 139d10a3..6cb392f4 100644 --- a/modules/rating/test/phpunit/RatingOptionTest.class +++ b/modules/rating/test/phpunit/RatingOptionTest.class @@ -26,6 +26,9 @@ * @version $Revision: 17580 $ */ class RatingOptionTest extends ItemEditOptionTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_childAlbum; + public function __construct($methodName) { parent::__construct($methodName, 'rating', 'RatingItemEdit'); } diff --git a/modules/rearrange/test/phpunit/RearrangeItemsControllerTest.class b/modules/rearrange/test/phpunit/RearrangeItemsControllerTest.class index 0ae73f99..5c07fd3b 100644 --- a/modules/rearrange/test/phpunit/RearrangeItemsControllerTest.class +++ b/modules/rearrange/test/phpunit/RearrangeItemsControllerTest.class @@ -26,6 +26,9 @@ * @version $Revision: 17580 $ */ class RearrangeItemsControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_childIds; + public function __construct($methodName) { parent::__construct($methodName, 'rearrange.RearrangeItems'); } diff --git a/modules/register/UserSelfRegistration.inc b/modules/register/UserSelfRegistration.inc index c1e154df..4c26bdcf 100644 --- a/modules/register/UserSelfRegistration.inc +++ b/modules/register/UserSelfRegistration.inc @@ -27,6 +27,9 @@ */ class UserSelfRegistrationController extends GalleryController { + /* deprecated dynamic properties in php 8.2 */ + var $_pluginInstances; + /** * @see GalleryController::handleRequest */ diff --git a/modules/register/test/phpunit/AdminSelfRegistrationControllerTest.class b/modules/register/test/phpunit/AdminSelfRegistrationControllerTest.class index 420fa568..00833afa 100644 --- a/modules/register/test/phpunit/AdminSelfRegistrationControllerTest.class +++ b/modules/register/test/phpunit/AdminSelfRegistrationControllerTest.class @@ -28,6 +28,9 @@ class AdminSelfRegistrationControllerTest extends GalleryControllerTestCase { public $paramNames; + /* deprecated dynamic properties in php 8.2 */ + public $_pendingUser; + public function __construct($methodName) { parent::__construct($methodName, 'register.AdminSelfRegistration'); } diff --git a/modules/register/test/phpunit/UserSelfRegistrationControllerTest.class b/modules/register/test/phpunit/UserSelfRegistrationControllerTest.class index f3d3ebb5..750c0968 100644 --- a/modules/register/test/phpunit/UserSelfRegistrationControllerTest.class +++ b/modules/register/test/phpunit/UserSelfRegistrationControllerTest.class @@ -29,6 +29,10 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryValidationPlugin.class' * @version $Revision: 18057 $ */ class UserSelfRegistrationControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_emailBody; + public $_emailSubject; + public function __construct($methodName) { parent::__construct($methodName, 'register.UserSelfRegistration'); } @@ -659,6 +663,10 @@ class UserSelfRegistrationControllerTest extends GalleryControllerTestCase { } class RegisterDummyPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_test; + public $_platform; + public function __construct($platform, &$test) { $this->_platform = $platform; $this->_test =& $test; @@ -748,7 +756,11 @@ class RegisterDummyPlatform { /** * Mock ValidationPlugin */ -class UserSelfRegistrationControllerTestPlugin extends GalleryValidationPlugin { +class UserSelfRegistrationControllerTestPlugin extends GalleryValidationPlugin { /* deprecated dynamic properties in php 8.2 */ + public $_emailBody; + public $_errors; + public $_continue; + public function setContinue($continue) { $this->_continue = $continue; } diff --git a/modules/rewrite/classes/RewriteUrlGenerator.class b/modules/rewrite/classes/RewriteUrlGenerator.class index d0d3713c..39e32d0a 100644 --- a/modules/rewrite/classes/RewriteUrlGenerator.class +++ b/modules/rewrite/classes/RewriteUrlGenerator.class @@ -43,6 +43,9 @@ class RewriteUrlGenerator extends GalleryUrlGenerator { */ var $_shortUrls = array(); + /* deprecated dynamic properties in php 8.2 */ + var $_language; + /** * Return first short URL to match URL params. * @param array $params URL params diff --git a/modules/rewrite/classes/parsers/isapirewrite/IsapiRewriteUrlGenerator.class b/modules/rewrite/classes/parsers/isapirewrite/IsapiRewriteUrlGenerator.class index a2648d24..e9a219ce 100644 --- a/modules/rewrite/classes/parsers/isapirewrite/IsapiRewriteUrlGenerator.class +++ b/modules/rewrite/classes/parsers/isapirewrite/IsapiRewriteUrlGenerator.class @@ -29,6 +29,8 @@ GalleryCoreApi::requireOnce('modules/rewrite/classes/RewriteUrlGenerator.class') * @version $Revision: 17580 $ */ class IsapiRewriteUrlGenerator extends RewriteUrlGenerator { + /* deprecated dynamic properties in php 8.2 */ + var $_rootItemId; /** * @see GalleryUrlGenerator::init diff --git a/modules/rewrite/classes/parsers/pathinfo/PathInfoUrlGenerator.class b/modules/rewrite/classes/parsers/pathinfo/PathInfoUrlGenerator.class index 8ac5d89a..7852ebb2 100644 --- a/modules/rewrite/classes/parsers/pathinfo/PathInfoUrlGenerator.class +++ b/modules/rewrite/classes/parsers/pathinfo/PathInfoUrlGenerator.class @@ -46,6 +46,9 @@ class PathInfoUrlGenerator extends RewriteUrlGenerator { */ var $_piFile; + /* deprecated dynamic properties in php 8.2 */ + var $_baseUrl; + /** * @see GalleryUrlGenerator::init */ diff --git a/modules/rewrite/test/phpunit/AdminRewriteControllerTest.class b/modules/rewrite/test/phpunit/AdminRewriteControllerTest.class index b8a9f9a2..a919862f 100644 --- a/modules/rewrite/test/phpunit/AdminRewriteControllerTest.class +++ b/modules/rewrite/test/phpunit/AdminRewriteControllerTest.class @@ -961,6 +961,9 @@ class AdminRewriteMockModule extends GalleryModule { * @subpackage PHPUnit */ class AdminRewriteMockPlatform extends GalleryPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_list; + public function file_exists($file) { if (strpos($file, 'modules/adminrewritemock/module.inc') !== false) { return true; diff --git a/modules/rewrite/test/phpunit/IsapiRewriteHelperTest.class b/modules/rewrite/test/phpunit/IsapiRewriteHelperTest.class index 8f54b160..77a75ae5 100644 --- a/modules/rewrite/test/phpunit/IsapiRewriteHelperTest.class +++ b/modules/rewrite/test/phpunit/IsapiRewriteHelperTest.class @@ -31,6 +31,9 @@ GalleryCoreApi::requireOnce( 'modules/rewrite/classes/parsers/isapirewrite/IsapiRewriteHelper.class' ); class IsapiRewriteHelperTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_fileContent; + public function __construct($methodName) { parent::__construct($methodName); } @@ -219,6 +222,10 @@ class IsapiRewriteHelperMockPlatform extends GalleryPlatform { public $_fileExists = true; public $_previousContent = array(); + /* deprecated dynamic properties in php 8.2 */ + public $_readBuffer; + public $_test; + public function init(&$test) { $this->_test =& $test; } diff --git a/modules/rewrite/test/phpunit/IsapiRewriteParserTest.class b/modules/rewrite/test/phpunit/IsapiRewriteParserTest.class index 5453a371..ffbaa553 100644 --- a/modules/rewrite/test/phpunit/IsapiRewriteParserTest.class +++ b/modules/rewrite/test/phpunit/IsapiRewriteParserTest.class @@ -32,6 +32,11 @@ GalleryCoreApi::requireOnce('modules/rewrite/test/phpunit/RewriteParserTestCase. * @version $Revision: 17580 $ */ class IsapiRewriteParserTest extends RewriteParserTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_fileContent; + public $_parser; + public $_testPassString; + public function __construct($methodName) { parent::__construct($methodName, null); } diff --git a/modules/rewrite/test/phpunit/IsapiRewriteUrlGeneratorTest.class b/modules/rewrite/test/phpunit/IsapiRewriteUrlGeneratorTest.class index b10ef537..aa4b35a9 100644 --- a/modules/rewrite/test/phpunit/IsapiRewriteUrlGeneratorTest.class +++ b/modules/rewrite/test/phpunit/IsapiRewriteUrlGeneratorTest.class @@ -32,6 +32,16 @@ GalleryCoreApi::requireOnce('modules/rewrite/test/phpunit/RewriteUrlGeneratorTes * @version $Revision: 17580 $ */ class IsapiRewriteUrlGeneratorTest extends RewriteUrlGeneratorTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_testAlbum; + public $_testItem; + public $_testAlbumPath; + public $_testItemPath; + public $_urlEncodePath; + public $_origEmbed; + public $_urlGeneratorName; + public $_urlGenerator; + public function __construct($methodName) { parent::__construct($methodName, null); } diff --git a/modules/rewrite/test/phpunit/ModRewriteHelperTest.class b/modules/rewrite/test/phpunit/ModRewriteHelperTest.class index 4df1f801..a1e8b8a8 100644 --- a/modules/rewrite/test/phpunit/ModRewriteHelperTest.class +++ b/modules/rewrite/test/phpunit/ModRewriteHelperTest.class @@ -31,6 +31,10 @@ GalleryCoreApi::requireOnce( 'modules/rewrite/classes/parsers/modrewrite/ModRewriteHelper.class' ); class ModRewriteHelperTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_fileContent; + public $_embeddedFileContent; + public function __construct($methodName) { parent::__construct($methodName); } @@ -369,6 +373,10 @@ class ModRewriteHelperMockPlatform extends GalleryPlatform { public $_embeddedPreviousContent = array(); public $_previousContent = array(); + /* deprecated dynamic properties in php 8.2 */ + public $_readBuffer; + public $_test; + public function init(&$test) { $this->_test =& $test; } diff --git a/modules/rewrite/test/phpunit/ModRewriteParserTest.class b/modules/rewrite/test/phpunit/ModRewriteParserTest.class index f43aaf29..3a741b16 100644 --- a/modules/rewrite/test/phpunit/ModRewriteParserTest.class +++ b/modules/rewrite/test/phpunit/ModRewriteParserTest.class @@ -30,6 +30,12 @@ GalleryCoreApi::requireOnce('modules/rewrite/classes/RewriteHelper.class'); GalleryCoreApi::requireOnce('modules/rewrite/classes/parsers/modrewrite/parser.inc'); GalleryCoreApi::requireOnce('modules/rewrite/test/phpunit/RewriteParserTestCase.class'); class ModRewriteParserTest extends RewriteParserTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_fileContent; + public $_embeddedFileContent; + public $_parser; + public $_testPassString; + public function __construct($methodName) { parent::__construct($methodName, null); } diff --git a/modules/rewrite/test/phpunit/ModRewriteUrlGeneratorTest.class b/modules/rewrite/test/phpunit/ModRewriteUrlGeneratorTest.class index a6a66b72..40a8c6eb 100644 --- a/modules/rewrite/test/phpunit/ModRewriteUrlGeneratorTest.class +++ b/modules/rewrite/test/phpunit/ModRewriteUrlGeneratorTest.class @@ -32,6 +32,17 @@ GalleryCoreApi::requireOnce('modules/rewrite/test/phpunit/RewriteUrlGeneratorTes * @version $Revision: 17580 $ */ class ModRewriteUrlGeneratorTest extends RewriteUrlGeneratorTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_expectedUrl; + public $_testAlbum; + public $_testItem; + public $_testAlbumPath; + public $_testItemPath; + public $_urlEncodePath; + public $_origEmbed; + public $_urlGeneratorName; + public $_urlGenerator; + public function __construct($methodName) { parent::__construct($methodName, null); } diff --git a/modules/rewrite/test/phpunit/PathInfoParserTest.class b/modules/rewrite/test/phpunit/PathInfoParserTest.class index 5aeec6d1..8d0f712f 100644 --- a/modules/rewrite/test/phpunit/PathInfoParserTest.class +++ b/modules/rewrite/test/phpunit/PathInfoParserTest.class @@ -30,6 +30,10 @@ GalleryCoreApi::requireOnce('modules/rewrite/classes/RewriteHelper.class'); GalleryCoreApi::requireOnce('modules/rewrite/classes/parsers/pathinfo/parser.inc'); GalleryCoreApi::requireOnce('modules/rewrite/test/phpunit/RewriteParserTestCase.class'); class PathInfoParserTest extends RewriteParserTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_parser; + public $_testPassString; + public function __construct($methodName) { parent::__construct($methodName, null); } diff --git a/modules/rewrite/test/phpunit/PathInfoUrlGeneratorTest.class b/modules/rewrite/test/phpunit/PathInfoUrlGeneratorTest.class index 63f4c3cd..58086103 100644 --- a/modules/rewrite/test/phpunit/PathInfoUrlGeneratorTest.class +++ b/modules/rewrite/test/phpunit/PathInfoUrlGeneratorTest.class @@ -29,6 +29,17 @@ GalleryCoreApi::requireOnce('modules/rewrite/test/phpunit/RewriteUrlGeneratorTes * @version $Revision: 17580 $ */ class PathInfoUrlGeneratorTest extends RewriteUrlGeneratorTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_expectedUrl; + public $_testAlbum; + public $_testItem; + public $_testAlbumPath; + public $_testItemPath; + public $_urlEncodePath; + public $_origEmbed; + public $_urlGeneratorName; + public $_urlGenerator; + public function __construct($methodName) { parent::__construct($methodName, null); } diff --git a/modules/rewrite/test/phpunit/RewriteApiTest.class b/modules/rewrite/test/phpunit/RewriteApiTest.class index c20e853b..9760bb4d 100644 --- a/modules/rewrite/test/phpunit/RewriteApiTest.class +++ b/modules/rewrite/test/phpunit/RewriteApiTest.class @@ -29,6 +29,9 @@ GalleryCoreApi::requireOnce('modules/rewrite/classes/RewriteHelper.class'); * @version $Revision: 17580 $ */ class RewriteApiTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_rewriteApi; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/rewrite/test/phpunit/RewriteHelperTest.class b/modules/rewrite/test/phpunit/RewriteHelperTest.class index 50189aa5..1cdc4b22 100644 --- a/modules/rewrite/test/phpunit/RewriteHelperTest.class +++ b/modules/rewrite/test/phpunit/RewriteHelperTest.class @@ -28,6 +28,9 @@ GalleryCoreApi::requireOnce('modules/rewrite/classes/RewriteHelper.class'); * @version $Revision: 20886 $ */ class RewriteHelperTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_defaultOptions; + public function __construct($methodName) { parent::__construct($methodName); } @@ -1120,6 +1123,9 @@ class RewriteHelperMockModule extends GalleryModule { } class RewriteHelperMockPlatform extends GalleryPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_list; + public function file_exists($file) { if (strpos($file, 'modules/rewritehelpermock/module.inc') !== false) { return true; diff --git a/modules/rewrite/test/phpunit/RewriteModuleTest.class b/modules/rewrite/test/phpunit/RewriteModuleTest.class index 590d1425..06402d77 100644 --- a/modules/rewrite/test/phpunit/RewriteModuleTest.class +++ b/modules/rewrite/test/phpunit/RewriteModuleTest.class @@ -492,6 +492,9 @@ class RewriteModuleMockParser extends RewriteParser { * Test platform for this test */ class RewriteModuleMockPlatform extends GalleryPlatform { + /* deprecated dynamic properties in php 8.2 */ + public $_list; + public function file_exists($file) { if (strpos($file, 'modules/rewritemodulemock/module.inc') !== false) { return true; diff --git a/modules/rewrite/test/phpunit/RewriteParserTestCase.class b/modules/rewrite/test/phpunit/RewriteParserTestCase.class index 37d4a558..3a7d41f8 100644 --- a/modules/rewrite/test/phpunit/RewriteParserTestCase.class +++ b/modules/rewrite/test/phpunit/RewriteParserTestCase.class @@ -529,6 +529,10 @@ class RewriteParserMockPlatform extends GalleryPlatform { public $_embeddedPreviousContent = array(); public $_previousContent = array(); + /* deprecated dynamic properties in php 8.2 */ + public $_test; + public $_list; + public function init(&$test) { $this->_test =& $test; } diff --git a/modules/sitemap/test/phpunit/SitemapViewTest.class b/modules/sitemap/test/phpunit/SitemapViewTest.class index edbdac4f..b14caec5 100644 --- a/modules/sitemap/test/phpunit/SitemapViewTest.class +++ b/modules/sitemap/test/phpunit/SitemapViewTest.class @@ -29,6 +29,10 @@ GalleryCoreApi::requireOnce('modules/sitemap/Sitemap.inc'); * @version $Revision: 20940 $ */ class SitemapViewTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_start_of_2005; + public $_start_of_2006; + public function __construct($methodName) { parent::__construct($methodName); } @@ -184,6 +188,9 @@ class SitemapViewTestUrlGenerator { GalleryCoreApi::requireOnce('modules/core/classes/GalleryPhpVm.class'); class SitemapViewTestVm extends GalleryPhpVm { + /* deprecated dynamic properties in php 8.2 */ + public $_time; + public function header($string, $replace = NULL) { echo "Header: $string\n"; } @@ -198,6 +205,9 @@ class SitemapViewTestVm extends GalleryPhpVm { } class SitemapViewTestStorage { + /* deprecated dynamic properties in php 8.2 */ + public $_storage; + public function __construct($storage) { $this->_storage = $storage; } diff --git a/modules/slideshow/AdminSlideshow.inc b/modules/slideshow/AdminSlideshow.inc index d04f1f74..5b94a929 100644 --- a/modules/slideshow/AdminSlideshow.inc +++ b/modules/slideshow/AdminSlideshow.inc @@ -29,6 +29,9 @@ GalleryCoreApi::requireOnce('modules/slideshow/classes/PicLensHelper.class'); */ class AdminSlideshowController extends GalleryController { + /* deprecated dynamic properties in php 8.2 */ + var $_picLensHelper; + /** * Provide an instance of PicLensHelper for the controller to use instead of * the default. This allows tests to inject this dependency. diff --git a/modules/thumbnail/test/phpunit/CustomThumbnailOptionTest.class b/modules/thumbnail/test/phpunit/CustomThumbnailOptionTest.class index 6f3380b4..68ba2ba2 100644 --- a/modules/thumbnail/test/phpunit/CustomThumbnailOptionTest.class +++ b/modules/thumbnail/test/phpunit/CustomThumbnailOptionTest.class @@ -30,6 +30,9 @@ GalleryCoreApi::requireOnce('modules/core/classes/GalleryToolkit.class'); * @version $Revision: 17580 $ */ class CustomThumbnailOptionTest extends ItemEditOptionTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_image; + public function __construct($methodName) { parent::__construct($methodName, 'thumbnail', 'CustomThumbnailOption'); } diff --git a/modules/thumbnail/test/phpunit/ThumbnailImageTest.class b/modules/thumbnail/test/phpunit/ThumbnailImageTest.class index 7214aa80..7980543a 100644 --- a/modules/thumbnail/test/phpunit/ThumbnailImageTest.class +++ b/modules/thumbnail/test/phpunit/ThumbnailImageTest.class @@ -29,6 +29,10 @@ GalleryCoreApi::requireOnce('modules/thumbnail/classes/ThumbnailHelper.class'); * @version $Revision: 17580 $ */ class ThumbnailImageTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_customThumbnail; + public $_mimeTypeThumbnail; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/thumbnail/test/phpunit/ThumbnailToolkitTest.class b/modules/thumbnail/test/phpunit/ThumbnailToolkitTest.class index 478e68b3..9dea05c3 100644 --- a/modules/thumbnail/test/phpunit/ThumbnailToolkitTest.class +++ b/modules/thumbnail/test/phpunit/ThumbnailToolkitTest.class @@ -28,6 +28,9 @@ GalleryCoreApi::requireOnce('modules/thumbnail/classes/ThumbnailHelper.class'); * @version $Revision: 17580 $ */ class ThumbnailToolkitTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_itemId; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/thumbpage/test/phpunit/ThumbOffsetItemEditPluginTest.class b/modules/thumbpage/test/phpunit/ThumbOffsetItemEditPluginTest.class index 680ea596..f9189776 100644 --- a/modules/thumbpage/test/phpunit/ThumbOffsetItemEditPluginTest.class +++ b/modules/thumbpage/test/phpunit/ThumbOffsetItemEditPluginTest.class @@ -26,6 +26,9 @@ * @version $Revision: 17580 $ */ class ThumbOffsetItemEditPluginTest extends ItemEditPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_thumbnail; + public function __construct($methodName) { parent::__construct($methodName, 'thumbpage', 'ItemEditThumbOffset'); } diff --git a/modules/thumbpage/test/phpunit/ThumbPageItemEditPluginTest.class b/modules/thumbpage/test/phpunit/ThumbPageItemEditPluginTest.class index 3878e628..38e09291 100644 --- a/modules/thumbpage/test/phpunit/ThumbPageItemEditPluginTest.class +++ b/modules/thumbpage/test/phpunit/ThumbPageItemEditPluginTest.class @@ -26,6 +26,9 @@ * @version $Revision: 17580 $ */ class ThumbPageItemEditPluginTest extends ItemEditPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_thumbnail; + public function __construct($methodName) { parent::__construct($methodName, 'thumbpage', 'ItemEditThumbPage'); } diff --git a/modules/useralbum/test/phpunit/UserAlbumControllerTest.class b/modules/useralbum/test/phpunit/UserAlbumControllerTest.class index 78dec8f6..dc5ade4f 100644 --- a/modules/useralbum/test/phpunit/UserAlbumControllerTest.class +++ b/modules/useralbum/test/phpunit/UserAlbumControllerTest.class @@ -27,6 +27,11 @@ * @version $Revision: 17631 $ */ class UserAlbumControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_userWithAlbum; + public $_userAlbumId; + public $_userWithoutAlbum; + public function __construct($methodName) { parent::__construct($methodName, 'useralbum.UserAlbum'); } diff --git a/modules/useralbum/test/phpunit/UserAlbumTest.class b/modules/useralbum/test/phpunit/UserAlbumTest.class index 19bbb52b..b709235a 100644 --- a/modules/useralbum/test/phpunit/UserAlbumTest.class +++ b/modules/useralbum/test/phpunit/UserAlbumTest.class @@ -27,6 +27,9 @@ * @version $Revision: 18064 $ */ class UserAlbumTest extends GalleryTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_allUserGroupId; + public function __construct($methodName) { parent::__construct($methodName); } diff --git a/modules/watermark/test/phpunit/ItemEditWatermarkPluginTest.class b/modules/watermark/test/phpunit/ItemEditWatermarkPluginTest.class index 27d86d79..63ead275 100644 --- a/modules/watermark/test/phpunit/ItemEditWatermarkPluginTest.class +++ b/modules/watermark/test/phpunit/ItemEditWatermarkPluginTest.class @@ -28,6 +28,16 @@ GalleryCoreApi::requireOnce('modules/watermark/classes/WatermarkImage.class'); * @version $Revision: 17580 $ */ class ItemEditWatermarkPluginTest extends ItemEditPluginTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_watermark; + public $_subalbum; + public $_preferreds; + public $_resizes; + public $_thumbnails; + public $_resize; + public $_thumbnail; + public $_templateAdapter; + public function __construct($methodName) { parent::__construct($methodName, 'watermark', 'ItemEditWatermark'); } diff --git a/modules/watermark/test/phpunit/UserWatermarkEditControllerTest.class b/modules/watermark/test/phpunit/UserWatermarkEditControllerTest.class index 672294a8..a172ed46 100644 --- a/modules/watermark/test/phpunit/UserWatermarkEditControllerTest.class +++ b/modules/watermark/test/phpunit/UserWatermarkEditControllerTest.class @@ -28,6 +28,9 @@ GalleryCoreApi::requireOnce('modules/watermark/classes/WatermarkImage.class'); * @version $Revision: 17580 $ */ class UserWatermarkEditControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_idToDelete; + public function __construct($methodName) { parent::__construct($methodName, 'watermark.UserWatermarkEdit'); } diff --git a/modules/watermark/test/phpunit/UserWatermarksControllerTest.class b/modules/watermark/test/phpunit/UserWatermarksControllerTest.class index 6effcd57..b3a85152 100644 --- a/modules/watermark/test/phpunit/UserWatermarksControllerTest.class +++ b/modules/watermark/test/phpunit/UserWatermarksControllerTest.class @@ -30,6 +30,9 @@ GalleryCoreApi::requireOnce('modules/watermark/classes/WatermarkImage.class'); * @version $Revision: 17580 $ */ class UserWatermarksControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_idToDelete; + public function __construct($methodName) { parent::__construct($methodName, 'watermark.UserWatermarks'); } diff --git a/modules/watermark/test/phpunit/WatermarkOptionTest.class b/modules/watermark/test/phpunit/WatermarkOptionTest.class index de019449..bfecb4b7 100644 --- a/modules/watermark/test/phpunit/WatermarkOptionTest.class +++ b/modules/watermark/test/phpunit/WatermarkOptionTest.class @@ -30,6 +30,12 @@ GalleryCoreApi::requireOnce('modules/watermark/classes/WatermarkImage.class'); * @version $Revision: 17580 $ */ class WatermarkOptionTest extends ItemAddOptionTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_images; + public $_thumbnails; + public $_resizes; + public $_itemThumbnails; + public function __construct($methodName) { parent::__construct($methodName, 'watermark', 'WatermarkOption'); } diff --git a/modules/watermark/test/phpunit/WatermarkSiteAdminControllerTest.class b/modules/watermark/test/phpunit/WatermarkSiteAdminControllerTest.class index 5d258a7e..6d9f49ae 100644 --- a/modules/watermark/test/phpunit/WatermarkSiteAdminControllerTest.class +++ b/modules/watermark/test/phpunit/WatermarkSiteAdminControllerTest.class @@ -30,6 +30,12 @@ GalleryCoreApi::requireOnce('modules/watermark/classes/WatermarkHelper.class'); * @version $Revision: 20886 $ */ class WatermarkSiteAdminControllerTest extends GalleryControllerTestCase { + /* deprecated dynamic properties in php 8.2 */ + public $_randomName; + public $_expectedName; + public $_beforeWatermarks; + public $_afterWatermarks; + public function __construct($methodName) { parent::__construct($methodName, 'watermark.WatermarkSiteAdmin'); } From 605d077b65ed7f624a10e3141dea83335843328c Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Sat, 30 Dec 2023 19:31:03 +0100 Subject: [PATCH 02/14] Correct formatting --- .../test/phpunit/UserSelfRegistrationControllerTest.class | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/register/test/phpunit/UserSelfRegistrationControllerTest.class b/modules/register/test/phpunit/UserSelfRegistrationControllerTest.class index 750c0968..14a8c842 100644 --- a/modules/register/test/phpunit/UserSelfRegistrationControllerTest.class +++ b/modules/register/test/phpunit/UserSelfRegistrationControllerTest.class @@ -756,7 +756,8 @@ class RegisterDummyPlatform { /** * Mock ValidationPlugin */ -class UserSelfRegistrationControllerTestPlugin extends GalleryValidationPlugin { /* deprecated dynamic properties in php 8.2 */ +class UserSelfRegistrationControllerTestPlugin extends GalleryValidationPlugin { + /* deprecated dynamic properties in php 8.2 */ public $_emailBody; public $_errors; public $_continue; From b6c853d712a75d54220dc2d6360c11f40ddc86c9 Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Sat, 30 Dec 2023 23:02:58 +0100 Subject: [PATCH 03/14] Additional deprecation warnings found --- modules/core/classes/GalleryStorage.class | 2 ++ modules/core/test/phpunit/DerivativeTest.class | 3 +++ modules/core/test/phpunit/ItemEditAlbumPluginTest.class | 1 + 3 files changed, 6 insertions(+) diff --git a/modules/core/classes/GalleryStorage.class b/modules/core/classes/GalleryStorage.class index a02224fb..ed20fbcc 100644 --- a/modules/core/classes/GalleryStorage.class +++ b/modules/core/classes/GalleryStorage.class @@ -1668,6 +1668,8 @@ function GalleryAdodbErrorHandler($dbms, $fn, $errno, $errmsg, $p1=false, $p2=fa * @subpackage Storage */ class MySqlStorage extends GalleryStorage { + /* deprecated dynamic properties in php 8.2 */ + var $_serverInfo; function __construct($config) { parent::__construct($config); diff --git a/modules/core/test/phpunit/DerivativeTest.class b/modules/core/test/phpunit/DerivativeTest.class index 13be239b..22e4c037 100644 --- a/modules/core/test/phpunit/DerivativeTest.class +++ b/modules/core/test/phpunit/DerivativeTest.class @@ -1413,6 +1413,9 @@ class DerivativeTestToolkit extends GalleryToolkit { * Test item */ class DerivativeTestItem extends GalleryDataItem { + /* deprecated dynamic properties in php 8.2 */ + public $parent; + /** * @see GalleryEntity::getClassName */ diff --git a/modules/core/test/phpunit/ItemEditAlbumPluginTest.class b/modules/core/test/phpunit/ItemEditAlbumPluginTest.class index dc598603..a52dc594 100644 --- a/modules/core/test/phpunit/ItemEditAlbumPluginTest.class +++ b/modules/core/test/phpunit/ItemEditAlbumPluginTest.class @@ -27,6 +27,7 @@ class ItemEditAlbumPluginTest extends ItemEditPluginTestCase { /* deprecated dynamic properties in php 8.2 */ public $_childAlbum; + public $_grandchildAlbum; public function __construct($methodName) { parent::__construct($methodName, 'core', 'ItemEditAlbum'); From 50a3677b08437c2e57e8a1790f82bd7195352df4 Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Sat, 30 Dec 2023 23:39:27 +0100 Subject: [PATCH 04/14] More deprecated syntax --- modules/core/classes/GalleryStorage.class | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/classes/GalleryStorage.class b/modules/core/classes/GalleryStorage.class index ed20fbcc..11a99d60 100644 --- a/modules/core/classes/GalleryStorage.class +++ b/modules/core/classes/GalleryStorage.class @@ -1125,11 +1125,11 @@ class GalleryStorage { $column = $this->_translateColumnName($member); if ($alias) { - $query = str_replace("[${class}::${member}]", "$alias.$column", $query); + $query = str_replace("[{$class}::{$member}]", "$alias.$column", $query); } else if ($class) { - $query = str_replace("[${class}::${member}]", "$table.$column", $query); + $query = str_replace("[{$class}::{$member}]", "$table.$column", $query); } else { - $query = str_replace("[::${member}]", "$column", $query); + $query = str_replace("[::{$member}]", "$column", $query); } } From c54b7bd70b4d5edac4c97bed12358124ecea6669 Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Tue, 2 Jan 2024 13:52:37 +0100 Subject: [PATCH 05/14] Still more deprecated syntax --- modules/core/classes/GalleryStorage.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/classes/GalleryStorage.class b/modules/core/classes/GalleryStorage.class index 11a99d60..52764918 100644 --- a/modules/core/classes/GalleryStorage.class +++ b/modules/core/classes/GalleryStorage.class @@ -1138,14 +1138,14 @@ class GalleryStorage { $class = $regs[1]; list ($table, $alias) = $this->_translateTableName($class); if ($alias == null) { - $query = str_replace("[${class}]", "$table", $query); + $query = str_replace("[{$class}]", "$table", $query); } else { list ($ret, $as) = $this->getFunctionSql('AS', array()); if ($ret) { /* XXX TODO: propagate this back up as a GalleryStatus */ return 'QUERY ERROR'; } - $query = str_replace("[${class}]", "$table $as $alias", $query); + $query = str_replace("[{$class}]", "$table $as $alias", $query); } } From ec621bc1f185169cd43bb2b828473f2285ea89ec Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Tue, 2 Jan 2024 15:02:27 +0100 Subject: [PATCH 06/14] Yet another set of deprecation warnings --- lib/tools/phpunit/index.php | 8 ++-- .../core/classes/GalleryTemplateAdapter.class | 2 +- modules/core/classes/GalleryTranslator.class | 8 ++-- .../GalleryTranslatorHelper_medium.class | 10 ++--- .../test/phpunit/PluginParameterTest.class | 14 +++---- .../core/test/phpunit/TranslatorTest.class | 42 +++++++++---------- modules/ffmpeg/module.inc | 6 +-- .../classes/ImageMagickToolkitHelper.class | 8 ++-- 8 files changed, 49 insertions(+), 49 deletions(-) diff --git a/lib/tools/phpunit/index.php b/lib/tools/phpunit/index.php index f5e91912..03a35150 100644 --- a/lib/tools/phpunit/index.php +++ b/lib/tools/phpunit/index.php @@ -31,7 +31,7 @@ @date_default_timezone_set(date_default_timezone_get()); $testReportDir = $gallery->getConfig('data.gallery.base') . 'test/'; $priorRuns = array(); -$glob = glob("${testReportDir}*"); +$glob = glob("{$testReportDir}*"); if ($glob) { foreach ($glob as $filename) { @@ -49,7 +49,7 @@ list($action, $run) = explode(':', $_GET['run']); $run = substr($run, 0, strspn($run, '0123456789')); - $runFile = "${testReportDir}run-$run.html"; + $runFile = "{$testReportDir}run-$run.html"; switch ($action) { case 'frame': @@ -68,7 +68,7 @@ case 'deleteall': foreach ($priorRuns as $pr) { - unlink("${testReportDir}run-$pr[key].html"); + unlink("{$testReportDir}run-$pr[key].html"); } header('Location: index.php'); @@ -118,7 +118,7 @@ function PhpUnitOutputInterceptor($message) { static $fd; if (!isset($fd)) { - $fd = fopen("${testReportDir}run-" . date('YmdHis') . '.html', 'wb+'); + $fd = fopen("{$testReportDir}run-" . date('YmdHis') . '.html', 'wb+'); } static $replaced; diff --git a/modules/core/classes/GalleryTemplateAdapter.class b/modules/core/classes/GalleryTemplateAdapter.class index 08c62a5f..1874049e 100644 --- a/modules/core/classes/GalleryTemplateAdapter.class +++ b/modules/core/classes/GalleryTemplateAdapter.class @@ -1050,7 +1050,7 @@ class GalleryTemplateAdapter { GalleryCoreApi::requireOnce("modules/$module/Callbacks.inc"); $userId = $smarty->_tpl_vars['theme']['actingUserId']; - $className = "${module}Callbacks"; + $className = "{$module}Callbacks"; $class = new $className; $ret = $class->callback($params, $smarty, $file, $userId); if ($ret) { diff --git a/modules/core/classes/GalleryTranslator.class b/modules/core/classes/GalleryTranslator.class index 00bcfc70..3b8551b9 100644 --- a/modules/core/classes/GalleryTranslator.class +++ b/modules/core/classes/GalleryTranslator.class @@ -315,8 +315,8 @@ class GalleryTranslator { if (function_exists('dgettext')) { $this->_isRightToLeft = isset($data['right-to-left']); /* Some systems only require LANG, some (like Mandrake) seem to require LANGUAGE also */ - putenv("LANG=${languageCode}"); - putenv("LANGUAGE=${languageCode}"); + putenv("LANG={$languageCode}"); + putenv("LANGUAGE={$languageCode}"); GalleryTranslator::_setlocale(LC_ALL, $languageCode); } @@ -426,7 +426,7 @@ class GalleryTranslator { list ($supportedLanguages, $defaultCountry) = GalleryTranslator::getLanguageData(); } - list ($language, $country) = preg_split('/[-_]/', "${languageCode}_"); + list ($language, $country) = preg_split('/[-_]/', "{$languageCode}_"); $country = GalleryUtilities::strToUpper($country); if ((empty($country) || !isset($supportedLanguages[$language][$country])) && isset($defaultCountry[$language])) { @@ -434,7 +434,7 @@ class GalleryTranslator { $country = $defaultCountry[$language]; } if (isset($supportedLanguages[$language][$country])) { - return array("${language}_${country}", $supportedLanguages[$language][$country]); + return array("{$language}_{$country}", $supportedLanguages[$language][$country]); } if ($fallback) { diff --git a/modules/core/classes/helpers/GalleryTranslatorHelper_medium.class b/modules/core/classes/helpers/GalleryTranslatorHelper_medium.class index 42c6b13a..c1c7a9b2 100644 --- a/modules/core/classes/helpers/GalleryTranslatorHelper_medium.class +++ b/modules/core/classes/helpers/GalleryTranslatorHelper_medium.class @@ -37,13 +37,13 @@ class GalleryTranslatorHelper_medium { $codeBase = GalleryCoreApi::getCodeBasePath(); $gallery->guaranteeTimeLimit(30); /* the glob may take a long time */ - $pluginPath = "$codeBase${pluginType}s/$pluginId/"; - $moFilesInPoDir = $platform->glob("${pluginPath}po/*.mo"); + $pluginPath = "$codeBase{$pluginType}s/$pluginId/"; + $moFilesInPoDir = $platform->glob("{$pluginPath}po/*.mo"); if (!empty($moFilesInPoDir)) { $moFiles = $moFilesInPoDir; $codePattern = '#(\w+).mo$#'; } else { - $moFiles = $platform->glob("${pluginPath}locale/*/LC_MESSAGES/*.mo"); + $moFiles = $platform->glob("{$pluginPath}locale/*/LC_MESSAGES/*.mo"); $codePattern = '#locale/(\w+)/LC_MESSAGES#'; } @@ -64,7 +64,7 @@ class GalleryTranslatorHelper_medium { return GalleryCoreApi::error(ERROR_PLATFORM_FAILURE); } - $destinationPath = $destinationDir . "${pluginType}s_$pluginId.mo"; + $destinationPath = $destinationDir . "{$pluginType}s_$pluginId.mo"; $success = $platform->copy($moPath, $destinationPath); if (!$success) { return GalleryCoreApi::error(ERROR_PLATFORM_FAILURE); @@ -83,7 +83,7 @@ class GalleryTranslatorHelper_medium { $gallery->guaranteeTimeLimit(30); /* the glob may take a long time */ $moFiles = $platform->glob($gallery->getConfig('data.gallery.locale') - . "*/LC_MESSAGES/${pluginType}s_$pluginId.mo"); + . "*/LC_MESSAGES/{$pluginType}s_$pluginId.mo"); $success = true; if (!empty($moFiles)) { foreach ($moFiles as $moPath) { diff --git a/modules/core/test/phpunit/PluginParameterTest.class b/modules/core/test/phpunit/PluginParameterTest.class index 0abdb00e..77c1471a 100644 --- a/modules/core/test/phpunit/PluginParameterTest.class +++ b/modules/core/test/phpunit/PluginParameterTest.class @@ -104,7 +104,7 @@ class PluginParameterTest extends GalleryTestCase { 'module', 'unitTestModule', $key, - "${value}-$i" + "{$value}-$i" ); if ($ret) { @@ -118,7 +118,7 @@ class PluginParameterTest extends GalleryTestCase { return $ret; } - $this->assertEquals("${value}-2", $newValue); + $this->assertEquals("{$value}-2", $newValue); } public function testFetchAllParameters() { @@ -131,8 +131,8 @@ class PluginParameterTest extends GalleryTestCase { $ret = GalleryCoreApi::setPluginParameter( 'module', 'unitTestModule', - "${key}-$i", - "${value}-$i" + "{$key}-$i", + "{$value}-$i" ); if ($ret) { @@ -147,7 +147,7 @@ class PluginParameterTest extends GalleryTestCase { } for ($i = 0; $i < 3; $i++) { - $this->assertEquals("${value}-$i", $newValues["${key}-$i"]); + $this->assertEquals("{$value}-$i", $newValues["{$key}-$i"]); } } @@ -162,7 +162,7 @@ class PluginParameterTest extends GalleryTestCase { 'module', 'unitTestModule', $key, - "${value}-$i", + "{$value}-$i", $i ); @@ -178,7 +178,7 @@ class PluginParameterTest extends GalleryTestCase { return $ret; } - $this->assertEquals("${value}-$i", $newValue); + $this->assertEquals("{$value}-$i", $newValue); } } diff --git a/modules/core/test/phpunit/TranslatorTest.class b/modules/core/test/phpunit/TranslatorTest.class index a217ce2f..0a441541 100644 --- a/modules/core/test/phpunit/TranslatorTest.class +++ b/modules/core/test/phpunit/TranslatorTest.class @@ -512,14 +512,14 @@ class TranslatorTest extends GalleryTestCase { $gallery->setConfig('data.gallery.locale', '/g2data/locale/'); $modulePath = GalleryCoreApi::getCodeBasePath('modules/TranslatorTest/'); - $poPath = "${modulePath}po/"; + $poPath = "{$modulePath}po/"; - $platform->setReply('glob', array("${poPath}*.mo", null), array("${poPath}aa.mo")); + $platform->setReply('glob', array("{$poPath}*.mo", null), array("{$poPath}aa.mo")); $platform->setReply('file_exists', array('/g2data/locale/aa/LC_MESSAGES/'), true); $platform->setReply('is_dir', array('/g2data/locale/aa/LC_MESSAGES/'), true); $platform->setReply( 'copy', - array("${poPath}aa.mo", '/g2data/locale/aa/LC_MESSAGES/modules_TranslatorTest.mo'), + array("{$poPath}aa.mo", '/g2data/locale/aa/LC_MESSAGES/modules_TranslatorTest.mo'), true ); $gallery->setPlatform($platform); @@ -541,19 +541,19 @@ class TranslatorTest extends GalleryTestCase { $gallery->setConfig('data.gallery.locale', '/g2data/locale/'); $modulePath = GalleryCoreApi::getCodeBasePath('modules/TranslatorTest/'); - $poPath = "${modulePath}po/"; + $poPath = "{$modulePath}po/"; - $platform->setReply('glob', array("${poPath}*.mo", null), array()); + $platform->setReply('glob', array("{$poPath}*.mo", null), array()); $platform->setReply( 'glob', - array("${modulePath}locale/*/LC_MESSAGES/*.mo", null), - array("${modulePath}locale/aa/LC_MESSAGES/aa.mo") + array("{$modulePath}locale/*/LC_MESSAGES/*.mo", null), + array("{$modulePath}locale/aa/LC_MESSAGES/aa.mo") ); $platform->setReply('file_exists', array('/g2data/locale/aa/LC_MESSAGES/'), true); $platform->setReply('is_dir', array('/g2data/locale/aa/LC_MESSAGES/'), true); $platform->setReply( 'copy', - array("${modulePath}locale/aa/LC_MESSAGES/aa.mo", + array("{$modulePath}locale/aa/LC_MESSAGES/aa.mo", '/g2data/locale/aa/LC_MESSAGES/modules_TranslatorTest.mo', ), true ); @@ -576,9 +576,9 @@ class TranslatorTest extends GalleryTestCase { $gallery->setConfig('data.gallery.locale', '/g2data/locale/'); $modulePath = GalleryCoreApi::getCodeBasePath('modules/TranslatorTest/'); - $poPath = "${modulePath}po/"; + $poPath = "{$modulePath}po/"; - $platform->setReply('glob', array("${poPath}*.mo", null), array("${poPath}aa.mo")); + $platform->setReply('glob', array("{$poPath}*.mo", null), array("{$poPath}aa.mo")); // This next block is what GalleryUtilities::guaranteeDirExists requires $platform->setReply('file_exists', array('/g2data/locale/aa/LC_MESSAGES/'), false); @@ -647,8 +647,8 @@ class TranslatorTest extends GalleryTestCase { $platform->setReply( 'glob', - array("${codeBase}modules/*/po", null), - array("${codeBase}modules/test/po") + array("{$codeBase}modules/*/po", null), + array("{$codeBase}modules/test/po") ); $platform->setReply( 'file_exists', @@ -657,7 +657,7 @@ class TranslatorTest extends GalleryTestCase { ); $platform->setReply( 'file_exists', - array("${codeBase}modules/test/po/wx_YZ.mo"), + array("{$codeBase}modules/test/po/wx_YZ.mo"), false ); $platform->setReply( @@ -667,7 +667,7 @@ class TranslatorTest extends GalleryTestCase { ); $platform->setReply( 'file_exists', - array("${codeBase}modules/test/po/wx.mo"), + array("{$codeBase}modules/test/po/wx.mo"), true ); @@ -681,14 +681,14 @@ class TranslatorTest extends GalleryTestCase { $platform->setReply('mkdir', array('/g2data/locale/wx/LC_MESSAGES/', 755), true); $platform->setReply( 'copy', - array("${codeBase}modules/test/po/wx.mo", + array("{$codeBase}modules/test/po/wx.mo", '/g2data/locale/wx/LC_MESSAGES/modules_test.mo', ), true ); $platform->setReply( 'glob', - array("${codeBase}themes/*/po", null), - array("${codeBase}themes/matrix/po") + array("{$codeBase}themes/*/po", null), + array("{$codeBase}themes/matrix/po") ); $platform->setReply( 'file_exists', @@ -697,7 +697,7 @@ class TranslatorTest extends GalleryTestCase { ); $platform->setReply( 'file_exists', - array("${codeBase}themes/matrix/po/wx_YZ.mo"), + array("{$codeBase}themes/matrix/po/wx_YZ.mo"), false ); $platform->setReply( @@ -732,8 +732,8 @@ class TranslatorTest extends GalleryTestCase { $platform->setReply( 'glob', - array("${codeBase}modules/*/po", null), - array("${codeBase}modules/test/po") + array("{$codeBase}modules/*/po", null), + array("{$codeBase}modules/test/po") ); $platform->setReply( 'file_exists', @@ -745,7 +745,7 @@ class TranslatorTest extends GalleryTestCase { array("/g2data/locale/$language/LC_MESSAGES/modules_test.mo"), true ); - $platform->setReply('glob', array("${codeBase}themes/*/po", null), array()); + $platform->setReply('glob', array("{$codeBase}themes/*/po", null), array()); } $gallery->setPlatform($platform); diff --git a/modules/ffmpeg/module.inc b/modules/ffmpeg/module.inc index 88d40f1d..ac6d2ef6 100644 --- a/modules/ffmpeg/module.inc +++ b/modules/ffmpeg/module.inc @@ -64,16 +64,16 @@ class FfmpegModule extends GalleryModule { } $slash = $platform->getDirectorySeparator(); - $imageDir = $gallery->getConfig('data.gallery.plugins_data') . "modules${slash}ffmpeg"; + $imageDir = $gallery->getConfig('data.gallery.plugins_data') . "modules{$slash}ffmpeg"; list ($success) = GalleryUtilities::guaranteeDirExists($imageDir); if (!$success) { return GalleryCoreApi::error(ERROR_PLATFORM_FAILURE, __FILE__, __LINE__, "Unable to create directory: $imageDir"); } - $imageFile = "$imageDir${slash}filmreel.png"; + $imageFile = "$imageDir{$slash}filmreel.png"; if (!$platform->is_file($imageFile) && - !$platform->copy(dirname(__FILE__) . "${slash}images${slash}filmreel.png", + !$platform->copy(dirname(__FILE__) . "{$slash}images{$slash}filmreel.png", $imageFile)) { return GalleryCoreApi::error(ERROR_PLATFORM_FAILURE, __FILE__, __LINE__, "Unable to copy filmreel.png to $imageDir"); diff --git a/modules/imagemagick/classes/ImageMagickToolkitHelper.class b/modules/imagemagick/classes/ImageMagickToolkitHelper.class index 8ccc0c90..d62bf4ce 100644 --- a/modules/imagemagick/classes/ImageMagickToolkitHelper.class +++ b/modules/imagemagick/classes/ImageMagickToolkitHelper.class @@ -233,7 +233,7 @@ class ImageMagickToolkitHelper { global $gallery; $platform =& $gallery->getPlatform(); $slash = $platform->getDirectorySeparator(); - $dataPath = dirname(dirname(__FILE__)) . "${slash}data${slash}"; + $dataPath = dirname(dirname(__FILE__)) . "{$slash}data{$slash}"; if (empty($imageMagickPath)) { list ($ret, $imageMagickPath) = @@ -339,7 +339,7 @@ class ImageMagickToolkitHelper { global $gallery; $platform =& $gallery->getPlatform(); $slash = $platform->getDirectorySeparator(); - $dataPath = dirname(dirname(__FILE__)) . "${slash}data${slash}"; + $dataPath = dirname(dirname(__FILE__)) . "{$slash}data{$slash}"; /* * If the path is not restricted by open_basedir, then verify that it's legal. @@ -651,7 +651,7 @@ class ImageMagickToolkitHelper { global $gallery; $platform =& $gallery->getPlatform(); $slash = $platform->getDirectorySeparator(); - $dataPath = dirname(dirname(__FILE__)) . "${slash}data${slash}"; + $dataPath = dirname(dirname(__FILE__)) . "{$slash}data{$slash}"; list ($ret, $convertCmd) = ImageMagickToolkitHelper::getCommand('convert', $imageMagickPath); @@ -693,7 +693,7 @@ class ImageMagickToolkitHelper { global $gallery; $platform =& $gallery->getPlatform(); $slash = $platform->getDirectorySeparator(); - $dataPath = dirname(dirname(__FILE__)) . "${slash}data${slash}"; + $dataPath = dirname(dirname(__FILE__)) . "{$slash}data{$slash}"; list ($ret, $convertCmd) = ImageMagickToolkitHelper::getCommand('convert', $imageMagickPath); From 2a6d6e4248ba8dac47e66560becd786d191e007e Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Tue, 2 Jan 2024 15:23:33 +0100 Subject: [PATCH 07/14] More deprecation warnings fixed --- modules/jpegtran/classes/JpegtranToolkitHelper.class | 2 +- modules/linkitem/module.inc | 4 ++-- modules/slideshow/DownloadPicLens.inc | 4 ++-- modules/slideshow/classes/PicLensHelper.class | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/jpegtran/classes/JpegtranToolkitHelper.class b/modules/jpegtran/classes/JpegtranToolkitHelper.class index eece74f6..9256fd67 100644 --- a/modules/jpegtran/classes/JpegtranToolkitHelper.class +++ b/modules/jpegtran/classes/JpegtranToolkitHelper.class @@ -94,7 +94,7 @@ class JpegtranToolkitHelper { global $gallery; $platform =& $gallery->getPlatform(); $slash = $platform->getDirectorySeparator(); - $dataPath = dirname(dirname(__FILE__)) . "${slash}data${slash}"; + $dataPath = dirname(dirname(__FILE__)) . "{$slash}data{$slash}"; /* * If the path is not restricted by open_basedir, then verify that it's legal. Else just diff --git a/modules/linkitem/module.inc b/modules/linkitem/module.inc index 383c99b2..cb75f0dc 100644 --- a/modules/linkitem/module.inc +++ b/modules/linkitem/module.inc @@ -46,7 +46,7 @@ class LinkItemModule extends GalleryModule /* and GalleryEventListener */ { $platform =& $gallery->getPlatform(); $slash = $platform->getDirectorySeparator(); - $imageDir = $gallery->getConfig('data.gallery.plugins_data') . "modules${slash}linkitem"; + $imageDir = $gallery->getConfig('data.gallery.plugins_data') . "modules{$slash}linkitem"; list ($success) = GalleryUtilities::guaranteeDirExists($imageDir); if (!$success) { return GalleryCoreApi::error(ERROR_PLATFORM_FAILURE, __FILE__, __LINE__, @@ -55,7 +55,7 @@ class LinkItemModule extends GalleryModule /* and GalleryEventListener */ { $imageFile = "$imageDir${slash}arrow.png"; if (!$platform->is_file($imageFile) && - !$platform->copy(dirname(__FILE__) . "${slash}images${slash}arrow.png", $imageFile)) { + !$platform->copy(dirname(__FILE__) . "{$slash}images{$slash}arrow.png", $imageFile)) { return GalleryCoreApi::error(ERROR_PLATFORM_FAILURE, __FILE__, __LINE__, "Unable to copy arrow.png to $imageDir"); } diff --git a/modules/slideshow/DownloadPicLens.inc b/modules/slideshow/DownloadPicLens.inc index 6aa96ee4..5d6de846 100644 --- a/modules/slideshow/DownloadPicLens.inc +++ b/modules/slideshow/DownloadPicLens.inc @@ -60,12 +60,12 @@ class DownloadPicLensView extends GalleryView { $codeDir = $gallery->getConfig('data.gallery.plugins_data') . 'modules/slideshow/'; switch ($file) { case 'js': - return $this->_sendFile(array('path' => "${codeDir}piclens.js", + return $this->_sendFile(array('path' => "{$codeDir}piclens.js", 'mimeType' => 'application/x-javascript', 'pseudoFileName' => 'piclens.js')); case 'swf': - return $this->_sendFile(array('path' => "${codeDir}PicLensLite.swf", + return $this->_sendFile(array('path' => "{$codeDir}PicLensLite.swf", 'mimeType' => 'application/x-shockwave-flash', 'pseudoFileName' => 'PicLensLite.swf')); diff --git a/modules/slideshow/classes/PicLensHelper.class b/modules/slideshow/classes/PicLensHelper.class index 594be462..bbfc85e1 100644 --- a/modules/slideshow/classes/PicLensHelper.class +++ b/modules/slideshow/classes/PicLensHelper.class @@ -48,8 +48,8 @@ class PicLensHelper { } $codeDir = $gallery->getConfig('data.gallery.plugins_data') . 'modules/slideshow/'; - $jsPath = "${codeDir}piclens.js"; - $swfPath = "${codeDir}PicLensLite.swf"; + $jsPath = "{$codeDir}piclens.js"; + $swfPath = "{$codeDir}PicLensLite.swf"; list($success1) = GalleryCoreApi::fetchWebFile($info['jsUrl'], "$jsPath.new"); list($success2) = GalleryCoreApi::fetchWebFile($info['swfUrl'], "$swfPath.new"); if ($success1 && $success2) { From e53096ef1a61ee541a0936a933d4fa65dae2caab Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Tue, 2 Jan 2024 15:39:05 +0100 Subject: [PATCH 08/14] One missed deprecation warning in previous commit --- modules/linkitem/module.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/linkitem/module.inc b/modules/linkitem/module.inc index cb75f0dc..4a967af4 100644 --- a/modules/linkitem/module.inc +++ b/modules/linkitem/module.inc @@ -53,7 +53,7 @@ class LinkItemModule extends GalleryModule /* and GalleryEventListener */ { "Unable to create directory: $imageDir"); } - $imageFile = "$imageDir${slash}arrow.png"; + $imageFile = "$imageDir{$slash}arrow.png"; if (!$platform->is_file($imageFile) && !$platform->copy(dirname(__FILE__) . "{$slash}images{$slash}arrow.png", $imageFile)) { return GalleryCoreApi::error(ERROR_PLATFORM_FAILURE, __FILE__, __LINE__, From c7e227e315104b82fb5c0d1a9a6740e2e4458eca Mon Sep 17 00:00:00 2001 From: Greg Stoll Date: Fri, 12 Jan 2024 19:38:00 -0600 Subject: [PATCH 09/14] mark GalleryRemoteConstants functions static --- modules/remote/classes/GalleryRemoteConstants.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/remote/classes/GalleryRemoteConstants.class b/modules/remote/classes/GalleryRemoteConstants.class index b53b5c65..0c8a582c 100644 --- a/modules/remote/classes/GalleryRemoteConstants.class +++ b/modules/remote/classes/GalleryRemoteConstants.class @@ -33,7 +33,7 @@ class GalleryRemoteConstants { * Return the current Major/Minor version codes * @return array (MAJ => ##, MIN => ##) */ - function getVersionCodes() { + static function getVersionCodes() { static $grVersionCodes; if (empty($grVersionCodes)) { @@ -48,7 +48,7 @@ class GalleryRemoteConstants { * Return remote protocol status codes * @return array (SUCCESS => ##, PASSWORD_WRONG => ##, ...) */ - function getStatusCodes() { + static function getStatusCodes() { static $grStatusCodes; if (empty($grStatusCodes)) { From eb6a04f1f648f68a6cda2843c81fcf03801b2d93 Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Sun, 14 Jan 2024 19:13:04 +0100 Subject: [PATCH 10/14] Back out unnecessary changes --- .../classes/parsers/isapirewrite/IsapiRewriteUrlGenerator.class | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/rewrite/classes/parsers/isapirewrite/IsapiRewriteUrlGenerator.class b/modules/rewrite/classes/parsers/isapirewrite/IsapiRewriteUrlGenerator.class index e9a219ce..a2648d24 100644 --- a/modules/rewrite/classes/parsers/isapirewrite/IsapiRewriteUrlGenerator.class +++ b/modules/rewrite/classes/parsers/isapirewrite/IsapiRewriteUrlGenerator.class @@ -29,8 +29,6 @@ GalleryCoreApi::requireOnce('modules/rewrite/classes/RewriteUrlGenerator.class') * @version $Revision: 17580 $ */ class IsapiRewriteUrlGenerator extends RewriteUrlGenerator { - /* deprecated dynamic properties in php 8.2 */ - var $_rootItemId; /** * @see GalleryUrlGenerator::init From 10281d296aabbebe114b98536fa45cc3ff95905d Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Sun, 14 Jan 2024 19:16:02 +0100 Subject: [PATCH 11/14] Fix deprecation warning and changed implicit type casting behaviour in pgsql --- .../classes/GalleryStorage/PostgreSqlStorage.class | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/core/classes/GalleryStorage/PostgreSqlStorage.class b/modules/core/classes/GalleryStorage/PostgreSqlStorage.class index b47180a0..c3e390cd 100644 --- a/modules/core/classes/GalleryStorage/PostgreSqlStorage.class +++ b/modules/core/classes/GalleryStorage/PostgreSqlStorage.class @@ -138,7 +138,11 @@ class PostgreSqlStorage extends GalleryStorage { * @see GalleryStorage::convertBitsToInt */ function convertBitsToInt($bitsVal) { - return bindec($bitsVal); + if (is_null($bitsVal)) { + return 0; + } else { + return bindec($bitsVal); + } } /** @@ -203,11 +207,10 @@ class PostgreSqlStorage extends GalleryStorage { * 2 - number of rows */ $markers = GalleryUtilities::makeMarkers(sizeof($args[1])); - $rowList = rtrim(str_repeat('SELECT ' . $markers . ' UNION ALL ', $args[2]), - 'UNION ALL '); + $rowList = rtrim(str_repeat('(' . $markers . '), ', $args[2]), ', '); $sql = 'INSERT INTO ' . $args[0] . ' ('; $sql .= join(', ', $args[1]); - $sql .= ') ' . $rowList; + $sql .= ') VALUES ' . $rowList; break; case 'AVG': @@ -228,7 +231,7 @@ class PostgreSqlStorage extends GalleryStorage { */ function getVersion() { if (function_exists('pg_version')) { - return implode(' ', pg_version()); + return implode(' ', pg_version($this->_db->_connectionID)); } return null; } From f5dd2ca66e7a549292cc2337d7de35935b586b00 Mon Sep 17 00:00:00 2001 From: Ulf Heiman Date: Sun, 28 Jan 2024 14:38:16 +0100 Subject: [PATCH 12/14] Update to adodb 5.22.7 --- lib/adodb/adodb-csvlib.inc.php | 2 +- lib/adodb/adodb-errorhandler.inc.php | 9 ++- lib/adodb/adodb-errorpear.inc.php | 10 ++- lib/adodb/adodb-exceptions.inc.php | 16 +++-- lib/adodb/adodb-lib.inc.php | 60 +++++++++++----- lib/adodb/adodb-loadbalancer.inc.php | 12 ++-- lib/adodb/adodb-perf.inc.php | 6 +- lib/adodb/adodb-time.inc.php | 2 + lib/adodb/adodb-xmlschema.inc.php | 4 +- lib/adodb/adodb-xmlschema03.inc.php | 16 ++--- lib/adodb/adodb.inc.php | 55 ++++++++++----- lib/adodb/docs/changelog.md | 52 ++++++++++++++ lib/adodb/drivers/adodb-ado.inc.php | 6 +- lib/adodb/drivers/adodb-ado5.inc.php | 7 +- lib/adodb/drivers/adodb-ads.inc.php | 1 - lib/adodb/drivers/adodb-csv.inc.php | 2 +- lib/adodb/drivers/adodb-db2.inc.php | 2 +- lib/adodb/drivers/adodb-fbsql.inc.php | 1 - lib/adodb/drivers/adodb-firebird.inc.php | 20 +++--- lib/adodb/drivers/adodb-ibase.inc.php | 22 +++--- lib/adodb/drivers/adodb-informix72.inc.php | 1 - lib/adodb/drivers/adodb-ldap.inc.php | 1 - lib/adodb/drivers/adodb-mssql.inc.php | 1 - lib/adodb/drivers/adodb-mysqli.inc.php | 37 +++++----- lib/adodb/drivers/adodb-oci8.inc.php | 77 ++++++++++----------- lib/adodb/drivers/adodb-oci8po.inc.php | 11 ++- lib/adodb/drivers/adodb-odbc.inc.php | 9 ++- lib/adodb/drivers/adodb-oracle.inc.php | 1 - lib/adodb/drivers/adodb-pdo.inc.php | 1 - lib/adodb/drivers/adodb-postgres64.inc.php | 5 +- lib/adodb/drivers/adodb-postgres8.inc.php | 20 ++++-- lib/adodb/drivers/adodb-sqlanywhere.inc.php | 2 +- lib/adodb/drivers/adodb-sqlite.inc.php | 1 - lib/adodb/drivers/adodb-sqlite3.inc.php | 1 - lib/adodb/drivers/adodb-sybase.inc.php | 1 - lib/adodb/drivers/adodb-text.inc.php | 23 +++--- lib/adodb/perf/perf-oci8.inc.php | 2 +- lib/adodb/tohtml.inc.php | 5 +- 38 files changed, 323 insertions(+), 181 deletions(-) diff --git a/lib/adodb/adodb-csvlib.inc.php b/lib/adodb/adodb-csvlib.inc.php index 8273a17a..87efd940 100644 --- a/lib/adodb/adodb-csvlib.inc.php +++ b/lib/adodb/adodb-csvlib.inc.php @@ -76,10 +76,10 @@ function _rs2serialize(&$rs,$conn=false,$sql='') $savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode; $class = $rs->connection->arrayClass; + /** @var ADORecordSet $rs2 */ $rs2 = new $class(ADORecordSet::DUMMY_QUERY_ID); $rs2->timeCreated = $rs->timeCreated; # memcache fix $rs2->sql = $rs->sql; - $rs2->oldProvider = $rs->dataProvider; $rs2->InitArrayFields($rows,$flds); $rs2->fetchMode = $savefetch; return $line.serialize($rs2); diff --git a/lib/adodb/adodb-errorhandler.inc.php b/lib/adodb/adodb-errorhandler.inc.php index 0cd3f218..1d3b9e9e 100644 --- a/lib/adodb/adodb-errorhandler.inc.php +++ b/lib/adodb/adodb-errorhandler.inc.php @@ -37,7 +37,14 @@ */ function ADODB_Error_Handler($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnection) { - if (error_reporting() == 0) return; // obey @ protocol + // Do not throw if errors are suppressed by @ operator + // error_reporting() value for suppressed errors changed in PHP 8.0.0 + $suppressed = version_compare(PHP_VERSION, '8.0.0', '<') + ? 0 + : E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE; + if (error_reporting() == $suppressed) { + return; + } switch($fn) { case 'EXECUTE': $sql = $p1; diff --git a/lib/adodb/adodb-errorpear.inc.php b/lib/adodb/adodb-errorpear.inc.php index 2bb15947..7b173da8 100644 --- a/lib/adodb/adodb-errorpear.inc.php +++ b/lib/adodb/adodb-errorpear.inc.php @@ -52,7 +52,15 @@ function ADODB_Error_PEAR($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false) { global $ADODB_Last_PEAR_Error; - if (error_reporting() == 0) return; // obey @ protocol + // Do not throw if errors are suppressed by @ operator + // error_reporting() value for suppressed errors changed in PHP 8.0.0 + $suppressed = version_compare(PHP_VERSION, '8.0.0', '<') + ? 0 + : E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE; + if (error_reporting() == $suppressed) { + return; + } + switch($fn) { case 'EXECUTE': $sql = $p1; diff --git a/lib/adodb/adodb-exceptions.inc.php b/lib/adodb/adodb-exceptions.inc.php index 36566de4..e4fae817 100644 --- a/lib/adodb/adodb-exceptions.inc.php +++ b/lib/adodb/adodb-exceptions.inc.php @@ -81,10 +81,18 @@ function __construct($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection) function adodb_throw($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection) { -global $ADODB_EXCEPTION; + global $ADODB_EXCEPTION; + + // Do not throw if errors are suppressed by @ operator + // error_reporting() value for suppressed errors changed in PHP 8.0.0 + $suppressed = version_compare(PHP_VERSION, '8.0.0', '<') + ? 0 + : E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE; + if (error_reporting() == $suppressed) { + return; + } + + $errfn = is_string($ADODB_EXCEPTION) ? $ADODB_EXCEPTION : 'ADODB_EXCEPTION'; - if (error_reporting() == 0) return; // obey @ protocol - if (is_string($ADODB_EXCEPTION)) $errfn = $ADODB_EXCEPTION; - else $errfn = 'ADODB_EXCEPTION'; throw new $errfn($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection); } diff --git a/lib/adodb/adodb-lib.inc.php b/lib/adodb/adodb-lib.inc.php index 4c2668b2..90b8b9d6 100644 --- a/lib/adodb/adodb-lib.inc.php +++ b/lib/adodb/adodb-lib.inc.php @@ -508,32 +508,38 @@ function _adodb_getcount($zthis, $sql,$inputarr=false,$secs2cache=0) return $qryRecs; } -/* - Code originally from "Cornel G" - - This code might not work with SQL that has UNION in it - - Also if you are using CachePageExecute(), there is a strong possibility that - data will get out of synch. use CachePageExecute() only with tables that - rarely change. -*/ -function _adodb_pageexecute_all_rows($zthis, $sql, $nrows, $page, - $inputarr=false, $secs2cache=0) +/** + * Execute query with pagination including record count. + * + * This code might not work with SQL that has UNION in it. + * Also if you are using cachePageExecute(), there is a strong possibility that + * data will get out of sync. cachePageExecute() should only be used with + * tables that rarely change. + * + * @param ADOConnection $zthis Connection + * @param string $sql Query to execute + * @param int $nrows Number of rows per page + * @param int $page Page number to retrieve (1-based) + * @param array $inputarr Array of bind variables + * @param int $secs2cache Time-to-live of the cache (in seconds), 0 to force query execution + * + * @return ADORecordSet|bool + * + * @author Cornel G + */ +function _adodb_pageexecute_all_rows($zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0) { $atfirstpage = false; $atlastpage = false; - // If an invalid nrows is supplied, - // we assume a default value of 10 rows per page + // If an invalid nrows is supplied, assume a default value of 10 rows per page if (!isset($nrows) || $nrows <= 0) $nrows = 10; $qryRecs = _adodb_getcount($zthis,$sql,$inputarr,$secs2cache); $lastpageno = (int) ceil($qryRecs / $nrows); - $zthis->_maxRecordCount = $qryRecs; - // ***** Here we check whether $page is the last page or - // whether we are trying to retrieve - // a page number greater than the last page number. + // Check whether $page is the last page or if we are trying to retrieve + // a page number greater than the last one. if ($page >= $lastpageno) { $page = $lastpageno; $atlastpage = true; @@ -565,7 +571,25 @@ function _adodb_pageexecute_all_rows($zthis, $sql, $nrows, $page, return $rsreturn; } -// Iván Oliva version +/** + * Execute query with pagination without last page information. + * + * This code might not work with SQL that has UNION in it. + * Also if you are using cachePageExecute(), there is a strong possibility that + * data will get out of sync. cachePageExecute() should only be used with + * tables that rarely change. + * + * @param ADOConnection $zthis Connection + * @param string $sql Query to execute + * @param int $nrows Number of rows per page + * @param int $page Page number to retrieve (1-based) + * @param array $inputarr Array of bind variables + * @param int $secs2cache Time-to-live of the cache (in seconds), 0 to force query execution + * + * @return ADORecordSet|bool + * + * @author Iván Oliva + */ function _adodb_pageexecute_no_last_page($zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0) { $atfirstpage = false; diff --git a/lib/adodb/adodb-loadbalancer.inc.php b/lib/adodb/adodb-loadbalancer.inc.php index 88f5d0fd..de067805 100644 --- a/lib/adodb/adodb-loadbalancer.inc.php +++ b/lib/adodb/adodb-loadbalancer.inc.php @@ -38,17 +38,17 @@ class ADOdbLoadBalancer /** * @var bool|array All connections to each database. */ - protected $connections = false; + protected $connections = []; /** * @var bool|array Just connections to the write capable database. */ - protected $connections_write = false; + protected $connections_write = []; /** * @var bool|array Just connections to the readonly database. */ - protected $connections_readonly = false; + protected $connections_readonly = []; /** * @var array Counts of all connections and their types. @@ -73,12 +73,12 @@ class ADOdbLoadBalancer /** * @var bool Session variables that must be maintained across all connections, ie: SET TIME ZONE. */ - protected $session_variables = false; + protected $session_variables = []; /** * @var bool Called immediately after connecting to any DB. */ - protected $user_defined_session_init_sql = false; + protected $user_defined_session_init_sql = []; /** @@ -403,7 +403,7 @@ public function setSessionVariable($name, $value, $execute_immediately = true) */ private function executeSessionVariables($adodb_obj = false) { - if (is_array($this->session_variables)) { + if (is_array($this->session_variables) && count($this->session_variables) > 0) { $sql = ''; foreach ($this->session_variables as $name => $value) { // $sql .= 'SET SESSION '. $name .' '. $value; diff --git a/lib/adodb/adodb-perf.inc.php b/lib/adodb/adodb-perf.inc.php index b8804dff..91610536 100644 --- a/lib/adodb/adodb-perf.inc.php +++ b/lib/adodb/adodb-perf.inc.php @@ -1017,7 +1017,7 @@ function SplitSQL($sql) * ADODB_OPT_LOW for CPU-less optimization * Default is LOW ADODB_OPT_LOW * @author Markus Staab - * @return Returns true on success and false on error + * @return bool true on success, false on error */ function OptimizeTables() { @@ -1048,7 +1048,7 @@ function OptimizeTables() * ADODB_OPT_LOW for CPU-less optimization * Default is LOW ADODB_OPT_LOW * @author Markus Staab - * @return Returns true on success and false on error + * @return bool true on success, false on error */ function OptimizeTable( $table, $mode = ADODB_OPT_LOW) { @@ -1062,7 +1062,7 @@ function OptimizeTable( $table, $mode = ADODB_OPT_LOW) * optimize each using optmizeTable() * * @author Markus Staab - * @return Returns true on success and false on error + * @return bool true on success, false on error */ function optimizeDatabase() { diff --git a/lib/adodb/adodb-time.inc.php b/lib/adodb/adodb-time.inc.php index cfbdc6a5..0c3dd11d 100644 --- a/lib/adodb/adodb-time.inc.php +++ b/lib/adodb/adodb-time.inc.php @@ -2,6 +2,8 @@ /** * ADOdb Date Library. * + * @deprecated 5.22.6 Use 64-bit PHP native functions instead. + * * PHP native date functions use integer timestamps for computations. * Because of this, dates are restricted to the years 1901-2038 on Unix * and 1970-2038 on Windows due to integer overflow for dates beyond diff --git a/lib/adodb/adodb-xmlschema.inc.php b/lib/adodb/adodb-xmlschema.inc.php index ac13d34e..662e2aae 100644 --- a/lib/adodb/adodb-xmlschema.inc.php +++ b/lib/adodb/adodb-xmlschema.inc.php @@ -412,7 +412,7 @@ function addData( $attributes ) { * @param string $type ADODB datadict field type. * @param string $size Field size * @param array $opts Field options array - * @return array Field specifier array + * @return void */ function addField( $name, $type, $size = NULL, $opts = NULL ) { $field_id = $this->FieldID( $name ); @@ -446,7 +446,7 @@ function addField( $name, $type, $size = NULL, $opts = NULL ) { * @param string $field Field name * @param string $opt ADOdb field option * @param mixed $value Field option value - * @return array Field specifier array + * @return void */ function addFieldOpt( $field, $opt, $value = NULL ) { if( !isset( $value ) ) { diff --git a/lib/adodb/adodb-xmlschema03.inc.php b/lib/adodb/adodb-xmlschema03.inc.php index 83a0a788..3c8bce5d 100644 --- a/lib/adodb/adodb-xmlschema03.inc.php +++ b/lib/adodb/adodb-xmlschema03.inc.php @@ -450,7 +450,7 @@ function addData( $attributes ) { * @param string $type ADODB datadict field type. * @param string $size Field size * @param array $opts Field options array - * @return array Field specifier array + * @return void */ function addField( $name, $type, $size = NULL, $opts = NULL ) { $field_id = $this->fieldID( $name ); @@ -486,7 +486,7 @@ function addField( $name, $type, $size = NULL, $opts = NULL ) { * @param string $field Field name * @param string $opt ADOdb field option * @param mixed $value Field option value - * @return array Field specifier array + * @return void */ function addFieldOpt( $field, $opt, $value = NULL ) { if( $this->currentPlatform ) { @@ -766,7 +766,7 @@ function _tag_close( $parser, $tag ) { * Adds a field to the index * * @param string $name Field name - * @return string Field list + * @return string[] Field list */ function addField( $name ) { $this->columns[$this->fieldID( $name )] = $name; @@ -779,7 +779,7 @@ function addField( $name ) { * Adds options to the index * * @param string $opt Comma-separated list of index options. - * @return string Option list + * @return string[] Option list */ function addIndexOpt( $opt ) { $this->opts[] = $opt; @@ -929,10 +929,10 @@ function addField( $attributes ) { } /** - * Adds options to the index + * Adds data. * - * @param string $opt Comma-separated list of index options. - * @return string Option list + * @param string $cdata Data to add + * @return void */ function addData( $cdata ) { // check we're in a valid field @@ -1782,7 +1782,7 @@ function saveSQL( $filename = './schema.sql' ) { $sqlArray = $this->sqlArray; } if( !isset( $sqlArray ) ) { - return FALSE; + return false; } $fp = fopen( $filename, "w" ); diff --git a/lib/adodb/adodb.inc.php b/lib/adodb/adodb.inc.php index bf32b01f..ea29adeb 100644 --- a/lib/adodb/adodb.inc.php +++ b/lib/adodb/adodb.inc.php @@ -198,7 +198,7 @@ function ADODB_Setup() { /** * ADODB version as a string. */ - $ADODB_vers = 'v5.22.5 2023-04-03'; + $ADODB_vers = 'v5.22.7 2023-11-04'; /** * Determines whether recordset->RecordCount() is used. @@ -1466,7 +1466,7 @@ function HasFailedTrans() { * @param array|bool $inputarr holds the input data to bind to. * Null elements will be set to null. * - * @return ADORecordSet|bool + * @return ADORecordSet|false */ public function Execute($sql, $inputarr = false) { if ($this->fnExecute) { @@ -1666,6 +1666,18 @@ function _Execute($sql,$inputarr=false) { return $rs; } + /** + * Execute a query. + * + * @param string|array $sql Query to execute. + * @param array $inputarr An optional array of parameters. + * + * @return mixed|bool Query identifier or true if execution successful, false if failed. + */ + function _query($sql, $inputarr = false) { + return false; + } + function CreateSequence($seqname='adodbseq',$startID=1) { if (empty($this->_genSeqSQL)) { return false; @@ -3554,20 +3566,21 @@ function qStr($s, $magic_quotes=false) { /** - * Will select the supplied $page number from a recordset, given that it is paginated in pages of - * $nrows rows per page. It also saves two boolean values saying if the given page is the first - * and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination. + * Execute query with pagination. * - * See docs-adodb.htm#ex8 for an example of usage. - * NOTE: phpLens uses a different algorithm and does not use PageExecute(). + * Will select the supplied $page number from a recordset, divided in + * pages of $nrows rows each. It also saves two boolean values saying + * if the given page is the first and/or last one of the recordset. * - * @param string $sql - * @param int $nrows Number of rows per page to get - * @param int $page Page number to get (1-based) - * @param mixed[]|bool $inputarr Array of bind variables - * @param int $secs2cache Private parameter only used by jlim + * @param string $sql Query to execute + * @param int $nrows Number of rows per page + * @param int $page Page number to retrieve (1-based) + * @param array|bool $inputarr Array of bind variables + * @param int $secs2cache Time-to-live of the cache (in seconds), 0 to force query execution + * + * @return ADORecordSet|bool the recordset ($rs->databaseType == 'array') * - * @return mixed the recordset ($rs->databaseType == 'array') + * @author Iván Oliva */ function PageExecute($sql, $nrows, $page, $inputarr=false, $secs2cache=0) { global $ADODB_INCLUDED_LIB; @@ -3743,6 +3756,7 @@ protected function getChangedErrorMsg($old = null) { /** * Internal placeholder for record objects. Used by ADORecordSet->FetchObj(). */ + #[\AllowDynamicProperties] class ADOFetchObj { }; @@ -3982,11 +3996,20 @@ class ADORecordSet implements IteratorAggregate { var $_obj; /** Used by FetchObj */ var $_names; /** Used by FetchObj */ - var $_currentPage = -1; /** Added by Iván Oliva to implement recordset pagination */ - var $_atFirstPage = false; /** Added by Iván Oliva to implement recordset pagination */ - var $_atLastPage = false; /** Added by Iván Oliva to implement recordset pagination */ + // Recordset pagination + /** @var int Number of rows per page */ + var $rowsPerPage; + /** @var int Current page number */ + var $_currentPage = -1; + /** @var bool True if current page is the first page */ + var $_atFirstPage = false; + /** @var bool True if current page is the last page */ + var $_atLastPage = false; + /** @var int Last page number */ var $_lastPageNo = -1; + /** @var int Total number of rows in recordset */ var $_maxRecordCount = 0; + var $datetime = false; public $customActualTypes; diff --git a/lib/adodb/docs/changelog.md b/lib/adodb/docs/changelog.md index 918e3ecf..aa068e10 100644 --- a/lib/adodb/docs/changelog.md +++ b/lib/adodb/docs/changelog.md @@ -14,6 +14,56 @@ Older changelogs: -------------------------------------------------------------------------------- +## [5.22.7] - 2023-11-04 + +### Fixed + +- Respect @ operator in all error handlers on PHP 8 + [#981](https://github.com/ADOdb/ADOdb/issues/981) +- db2: Declaration of ADODB_db2::_query incompatible with parent + [#987](https://github.com/ADOdb/ADOdb/issues/987) +- mysqli: bulkBind reset after one call + [#1000](https://github.com/ADOdb/ADOdb/issues/1000) +- oci8: deprecation warning in selectLimit() on PHP 8.1 + [#992](https://github.com/ADOdb/ADOdb/issues/992) +- oci8: Fix Automatic conversion of false to array + [#998](https://github.com/ADOdb/ADOdb/issues/998) +- oci8: Prevent str_replace NULL error in qstr() methods on PHP 8.1 + [#999](https://github.com/ADOdb/ADOdb/issues/999) + + +## [5.22.6] - 2023-06-11 + +### Deprecated + +- Date/Time Library + [#970](https://github.com/ADOdb/ADOdb/issues/970) + +### Fixed + +- Creation of dynamic property deprecated warning with PHP 8.2 + [#954](https://github.com/ADOdb/ADOdb/issues/954) + [#975](https://github.com/ADOdb/ADOdb/issues/975) +- Remove unused oldProvider property in _rs2serialize() + [#957](https://github.com/ADOdb/ADOdb/issues/957) +- Fix ADOConnection::execute() documentation of return type + [#964](https://github.com/ADOdb/ADOdb/issues/964) +- Define _query() method in ADOConnection base class + [#966](https://github.com/ADOdb/ADOdb/issues/966) +- Restore rs2html() $htmlspecialchars param behavior + [#968](https://github.com/ADOdb/ADOdb/issues/968) +- adodb_throw() does not respect @ operator on PHP 8 + [#981](https://github.com/ADOdb/ADOdb/issues/981) +- loadbalancer: PHP 8.2 warnings + [#951](https://github.com/ADOdb/ADOdb/issues/951) +- mysql: Fail connection if native driver (mysqlnd) is not available + [#967](https://github.com/ADOdb/ADOdb/issues/967) +- pgsql: Fix PHP 8.1 deprecated warning + [#956](https://github.com/ADOdb/ADOdb/issues/956) +- pgsql: avoid Insert_ID() failing when lastval() is not set + [#978](https://github.com/ADOdb/ADOdb/issues/978) + + ## [5.22.5] - 2023-04-03 ### Removed @@ -1384,6 +1434,8 @@ Released together with [v4.95](changelog_v4.x.md#495---17-may-2007) - Adodb5 version,more error checking code now will use exceptions if available. +[5.22.7]: https://github.com/adodb/adodb/compare/v5.22.6...v5.22.7 +[5.22.6]: https://github.com/adodb/adodb/compare/v5.22.5...v5.22.6 [5.22.5]: https://github.com/adodb/adodb/compare/v5.22.4...v5.22.5 [5.22.4]: https://github.com/adodb/adodb/compare/v5.22.3...v5.22.4 [5.22.3]: https://github.com/adodb/adodb/compare/v5.22.2...v5.22.3 diff --git a/lib/adodb/drivers/adodb-ado.inc.php b/lib/adodb/drivers/adodb-ado.inc.php index fc000cec..df95c690 100644 --- a/lib/adodb/drivers/adodb-ado.inc.php +++ b/lib/adodb/drivers/adodb-ado.inc.php @@ -208,10 +208,6 @@ function MetaColumns($table, $normalize=true) return empty($arr) ? $false : $arr; } - - - - /* returns queryID or false */ function _query($sql,$inputarr=false) { @@ -504,7 +500,7 @@ function MetaType($t,$len=-1,$fieldobj=false) $t = $fieldobj->type; $len = $fieldobj->max_length; } - + if (array_key_exists($t,$this->connection->customActualTypes)) return $this->connection->customActualTypes[$t]; diff --git a/lib/adodb/drivers/adodb-ado5.inc.php b/lib/adodb/drivers/adodb-ado5.inc.php index 36f9c3b8..04b45abf 100644 --- a/lib/adodb/drivers/adodb-ado5.inc.php +++ b/lib/adodb/drivers/adodb-ado5.inc.php @@ -233,7 +233,6 @@ function MetaColumns($table, $normalize=true) return $arr; } - /* returns queryID or false */ function _query($sql,$inputarr=false) { try { // In PHP5, all COM errors are exceptions, so to maintain old behaviour... @@ -545,13 +544,13 @@ function MetaType($t,$len=-1,$fieldobj=false) $t = $fieldobj->type; $len = $fieldobj->max_length; } - + $t = strtoupper($t); - + if (array_key_exists($t,$this->connection->customActualTypes)) return $this->connection->customActualTypes[$t]; - if (!is_numeric($t)) + if (!is_numeric($t)) return $t; switch ($t) { diff --git a/lib/adodb/drivers/adodb-ads.inc.php b/lib/adodb/drivers/adodb-ads.inc.php index 8b877b6d..16eec976 100644 --- a/lib/adodb/drivers/adodb-ads.inc.php +++ b/lib/adodb/drivers/adodb-ads.inc.php @@ -564,7 +564,6 @@ function Prepare($sql) return array($sql, $stmt, false); } - /* returns queryID or false */ function _query($sql, $inputarr = false) { $last_php_error = $this->resetLastError(); diff --git a/lib/adodb/drivers/adodb-csv.inc.php b/lib/adodb/drivers/adodb-csv.inc.php index 8a59626e..e6694d9a 100644 --- a/lib/adodb/drivers/adodb-csv.inc.php +++ b/lib/adodb/drivers/adodb-csv.inc.php @@ -199,7 +199,7 @@ function _close() } } // class -class ADORecordset_csv extends ADORecordset { +class ADORecordset_csv extends ADORecordSet { function _close() { diff --git a/lib/adodb/drivers/adodb-db2.inc.php b/lib/adodb/drivers/adodb-db2.inc.php index e214d2d7..7c773849 100644 --- a/lib/adodb/drivers/adodb-db2.inc.php +++ b/lib/adodb/drivers/adodb-db2.inc.php @@ -1568,7 +1568,7 @@ function prepare($sql) * * @return mixed either the queryID or false */ - function _query(&$sql,$inputarr=false) + function _query($sql, $inputarr = false) { $db2Options = array(); /* diff --git a/lib/adodb/drivers/adodb-fbsql.inc.php b/lib/adodb/drivers/adodb-fbsql.inc.php index a4255eb9..64913bc2 100644 --- a/lib/adodb/drivers/adodb-fbsql.inc.php +++ b/lib/adodb/drivers/adodb-fbsql.inc.php @@ -134,7 +134,6 @@ function SelectDB($dbName) } - // returns queryID or false function _query($sql,$inputarr=false) { return fbsql_query("$sql;",$this->_connectionID); diff --git a/lib/adodb/drivers/adodb-firebird.inc.php b/lib/adodb/drivers/adodb-firebird.inc.php index 133d9f43..db3cca5d 100644 --- a/lib/adodb/drivers/adodb-firebird.inc.php +++ b/lib/adodb/drivers/adodb-firebird.inc.php @@ -483,14 +483,14 @@ public function prepare($sql) } /** - * Return the query id. - * - * @param string|array $sql - * @param array $iarr - * - * @return bool|object - */ - function _query($sql, $iarr = false) + * Execute a query. + * + * @param string|array $sql Query to execute. + * @param array $inputarr An optional array of parameters. + * + * @return object|bool Query identifier or true if execution successful, false if failed. + */ + function _query($sql, $inputarr = false) { if (!$this->isConnected()) { return false; @@ -512,8 +512,8 @@ function _query($sql, $iarr = false) $fn = 'fbird_query'; $args = [$conn, $sql]; } - if (is_array($iarr)) { - $args = array_merge($args, $iarr); + if (is_array($inputarr)) { + $args = array_merge($args, $inputarr); } $ret = call_user_func_array($fn, $args); diff --git a/lib/adodb/drivers/adodb-ibase.inc.php b/lib/adodb/drivers/adodb-ibase.inc.php index 25a9c3e8..8159c512 100644 --- a/lib/adodb/drivers/adodb-ibase.inc.php +++ b/lib/adodb/drivers/adodb-ibase.inc.php @@ -256,7 +256,7 @@ function MetaIndexes ($table, $primary = FALSE, $owner=false) // See http://community.borland.com/article/0,1410,25844,00.html - function RowLock($tables,$where,$col=false) + function rowLock($table, $where, $col = false) { if ($this->autoCommit) { $this->BeginTrans(); @@ -332,7 +332,7 @@ function Prepare($sql) // returns query ID if successful, otherwise false // there have been reports of problems with nested queries - the code is probably not re-entrant? - function _query($sql,$iarr=false) + function _query($sql, $inputarr = false) { if (!$this->autoCommit && $this->_transactionID) { $conn = $this->_transactionID; @@ -344,11 +344,11 @@ function _query($sql,$iarr=false) if (is_array($sql)) { $fn = 'ibase_execute'; $sql = $sql[1]; - if (is_array($iarr)) { - if (!isset($iarr[0])) { - $iarr[0] = ''; // PHP5 compat hack + if (is_array($inputarr)) { + if (!isset($inputarr[0])) { + $inputarr[0] = ''; // PHP5 compat hack } - $fnarr = array_merge(array($sql), $iarr); + $fnarr = array_merge(array($sql), $inputarr); $ret = call_user_func_array($fn, $fnarr); } else { $ret = $fn($sql); @@ -356,11 +356,11 @@ function _query($sql,$iarr=false) } else { $fn = 'ibase_query'; - if (is_array($iarr)) { - if (sizeof($iarr) == 0) { - $iarr[0] = ''; // PHP5 compat hack + if (is_array($inputarr)) { + if (sizeof($inputarr) == 0) { + $inputarr[0] = ''; // PHP5 compat hack } - $fnarr = array_merge(array($conn, $sql), $iarr); + $fnarr = array_merge(array($conn, $sql), $inputarr); $ret = call_user_func_array($fn, $fnarr); } else { $ret = $fn($conn, $sql); @@ -734,7 +734,7 @@ function SQLDate($fmt, $col=false) Class Name: Recordset --------------------------------------------------------------------------------------*/ -class ADORecordset_ibase extends ADORecordSet +class ADORecordSet_ibase extends ADORecordSet { var $databaseType = "ibase"; diff --git a/lib/adodb/drivers/adodb-informix72.inc.php b/lib/adodb/drivers/adodb-informix72.inc.php index 759bd5c8..6fddde3d 100644 --- a/lib/adodb/drivers/adodb-informix72.inc.php +++ b/lib/adodb/drivers/adodb-informix72.inc.php @@ -334,7 +334,6 @@ function Prepare($sql) else return array($sql,$stmt); } */ - // returns query ID if successful, otherwise false function _query($sql,$inputarr=false) { global $ADODB_COUNTRECS; diff --git a/lib/adodb/drivers/adodb-ldap.inc.php b/lib/adodb/drivers/adodb-ldap.inc.php index 323b3585..305f6a7f 100644 --- a/lib/adodb/drivers/adodb-ldap.inc.php +++ b/lib/adodb/drivers/adodb-ldap.inc.php @@ -157,7 +157,6 @@ function _inject_bind_options( $options ) { } } - /* returns _queryID or false */ function _query($sql,$inputarr=false) { $rs = @ldap_search( $this->_connectionID, $this->database, $sql ); diff --git a/lib/adodb/drivers/adodb-mssql.inc.php b/lib/adodb/drivers/adodb-mssql.inc.php index 269dd7ed..c0b714ed 100644 --- a/lib/adodb/drivers/adodb-mssql.inc.php +++ b/lib/adodb/drivers/adodb-mssql.inc.php @@ -725,7 +725,6 @@ function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') return $this->Execute($sql) != false; } - // returns query ID if successful, otherwise false function _query($sql,$inputarr=false) { $this->_errorMsg = false; diff --git a/lib/adodb/drivers/adodb-mysqli.inc.php b/lib/adodb/drivers/adodb-mysqli.inc.php index 545c6948..7ec8962d 100644 --- a/lib/adodb/drivers/adodb-mysqli.inc.php +++ b/lib/adodb/drivers/adodb-mysqli.inc.php @@ -167,6 +167,14 @@ function _connect($argHostname = null, if(!extension_loaded("mysqli")) { return null; } + // Check for a function that only exists in mysqlnd + if (!function_exists('mysqli_stmt_get_result')) { + // @TODO This will be treated as if the mysqli extension were not available + // This could be misleading, so we output an additional error message. + // We should probably throw a specific exception instead. + $this->outp("MySQL Native Driver (msqlnd) required"); + return null; + } $this->_connectionID = @mysqli_init(); if (is_null($this->_connectionID)) { @@ -1091,16 +1099,6 @@ function Prepare($sql) return array($sql,$stmt); } - /** - * Execute SQL - * - * @param string $sql SQL statement to execute, or possibly an array - * holding prepared statement ($sql[0] will hold sql text) - * @param array|bool $inputarr holds the input data to bind to. - * Null elements will be set to null. - * - * @return ADORecordSet|bool - */ public function execute($sql, $inputarr = false) { if ($this->fnExecute) { @@ -1146,8 +1144,10 @@ public function execute($sql, $inputarr = false) } $bulkTypeArray[] = $typeArray; } + $currentBulkBind = $this->bulkBind; $this->bulkBind = false; $ret = $this->_execute($sql, $bulkTypeArray); + $this->bulkBind = $currentBulkBind; } else { $typeArray = $this->getBindParamWithType($inputarr); $ret = $this->_execute($sql, $typeArray); @@ -1189,14 +1189,14 @@ private function getBindParamWithType($inputArr): array } /** - * Return the query id. - * - * @param string|array $sql - * @param array $inputarr - * - * @return bool|mysqli_result + * Execute a query. + * + * @param string|array $sql Query to execute. + * @param array $inputarr An optional array of parameters. + * + * @return mysqli_result|bool */ - function _query($sql, $inputarr) + function _query($sql, $inputarr = false) { global $ADODB_COUNTRECS; // Move to the next recordset, or return false if there is none. In a stored proc @@ -1466,6 +1466,9 @@ function getCharSet() return $this->charSet ?: false; } + /** + * @deprecated 5.21.0 Use {@see setConnectionParameter()} instead + */ function setCharSet($charset) { if (!$this->_connectionID || !method_exists($this->_connectionID,'set_charset')) { diff --git a/lib/adodb/drivers/adodb-oci8.inc.php b/lib/adodb/drivers/adodb-oci8.inc.php index ca787721..965c1621 100644 --- a/lib/adodb/drivers/adodb-oci8.inc.php +++ b/lib/adodb/drivers/adodb-oci8.inc.php @@ -92,7 +92,7 @@ class ADODB_oci8 extends ADOConnection { var $random = "abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)"; var $noNullStrings = false; var $connectSID = false; - var $_bind = false; + var $_bind = array(); var $_nestedSQL = true; var $_getarray = false; // currently not working var $leftOuter = ''; // oracle wierdness, $col = $value (+) for LEFT OUTER, $col (+)= $value for RIGHT OUTER @@ -781,6 +781,11 @@ function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) $hint = ''; } + // If non-bound statement, $inputarr is false + if (!$inputarr) { + $inputarr = array(); + } + if ($offset == -1 || ($offset < $this->selectOffsetAlg1 && 0 < $nrows && $nrows < 1000)) { if ($nrows > 0) { if ($offset > 0) { @@ -788,10 +793,6 @@ function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) } $sql = "select * from (".$sql.") where rownum <= :adodb_offset"; - // If non-bound statement, $inputarr is false - if (!$inputarr) { - $inputarr = array(); - } $inputarr['adodb_offset'] = $nrows; $nrows = -1; } @@ -809,32 +810,31 @@ function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) } $stmt = $stmt_arr[1]; - if (is_array($inputarr)) { - foreach($inputarr as $k => $v) { - $i=0; - if ($this->databaseType == 'oci8po') { - $bv_name = ":".$i++; + foreach($inputarr as $k => $v) { + $i = 0; + if ($this->databaseType == 'oci8po') { + $bv_name = ":" . $i++; + } else { + $bv_name = ":" . $k; + } + if (is_array($v)) { + // suggested by g.giunta@libero. + if (sizeof($v) == 2) { + oci_bind_by_name($stmt, $bv_name, $inputarr[$k][0], $v[1]); } else { - $bv_name = ":".$k; + oci_bind_by_name($stmt, $bv_name, $inputarr[$k][0], $v[1], $v[2]); } - if (is_array($v)) { - // suggested by g.giunta@libero. - if (sizeof($v) == 2) { - oci_bind_by_name($stmt,$bv_name,$inputarr[$k][0],$v[1]); - } - else { - oci_bind_by_name($stmt,$bv_name,$inputarr[$k][0],$v[1],$v[2]); - } + } else { + $len = -1; + if ($v === ' ') { + $len = 1; + } + if (isset($bindarr)) { + // prepared sql, so no need to oci_bind_by_name again + $bindarr[$k] = $v; } else { - $len = -1; - if ($v === ' ') { - $len = 1; - } - if (isset($bindarr)) { // is prepared sql, so no need to oci_bind_by_name again - $bindarr[$k] = $v; - } else { // dynamic sql, so rebind every time - oci_bind_by_name($stmt,$bv_name,$inputarr[$k],$len); - } + // dynamic sql, so rebind every time + oci_bind_by_name($stmt, $bv_name, $inputarr[$k], $len); } } } @@ -971,16 +971,6 @@ function UpdateBlobFile($table,$column,$val,$where,$blobtype='BLOB') return $rez; } - /** - * Execute SQL - * - * @param string|array $sql SQL statement to execute, or possibly an array holding - * prepared statement ($sql[0] will hold sql text). - * @param array|false $inputarr holds the input data to bind to. - * Null elements will be set to null. - * - * @return ADORecordSet|false - */ function Execute($sql,$inputarr=false) { if ($this->fnExecute) { @@ -1282,7 +1272,8 @@ function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false) } /** - * returns query ID if successful, otherwise false + * Execute a query. + * * this version supports: * * 1. $db->execute('select * from table'); @@ -1295,6 +1286,11 @@ function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false) * 4. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)'); * $db->bind($stmt,1); $db->bind($stmt,2); $db->bind($stmt,3); * $db->execute($stmt); + * + * @param string|array $sql Query to execute. + * @param array $inputarr An optional array of parameters. + * + * @return mixed|bool Query identifier or true if execution successful, false if failed. */ function _query($sql,$inputarr=false) { @@ -1583,6 +1579,9 @@ function qStr($s, $magic_quotes=false) if ($this->noNullStrings && strlen($s) == 0) { $s = ' '; } + else if (strlen($s) == 0) { + return "''"; + } if ($this->replaceQuote[0] == '\\'){ $s = str_replace('\\','\\\\',$s); } diff --git a/lib/adodb/drivers/adodb-oci8po.inc.php b/lib/adodb/drivers/adodb-oci8po.inc.php index aaf4bb5f..71c203b6 100644 --- a/lib/adodb/drivers/adodb-oci8po.inc.php +++ b/lib/adodb/drivers/adodb-oci8po.inc.php @@ -70,7 +70,16 @@ function SelectLimit($sql, $nrows=-1, $offset=-1, $inputarr=false, $secs2cache=0 return ADOConnection::SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache); } - // emulate handling of parameters ? ?, replacing with :bind0 :bind1 + /** + * Execute a query. + * + * Emulate handling of parameters ? ?, replacing with :bind0 :bind1 + * + * @param string|array $sql Query to execute. + * @param array $inputarr An optional array of parameters. + * + * @return mixed|bool Query identifier or true if execution successful, false if failed. + */ function _query($sql,$inputarr=false) { if (is_array($inputarr)) { diff --git a/lib/adodb/drivers/adodb-odbc.inc.php b/lib/adodb/drivers/adodb-odbc.inc.php index 508711a3..56db8b0e 100644 --- a/lib/adodb/drivers/adodb-odbc.inc.php +++ b/lib/adodb/drivers/adodb-odbc.inc.php @@ -26,7 +26,7 @@ /* * These constants are used to set define MetaColumns() method's behavior. - * - METACOLUMNS_RETURNS_ACTUAL makes the driver return the actual type, + * - METACOLUMNS_RETURNS_ACTUAL makes the driver return the actual type, * like all other drivers do (default) * - METACOLUMNS_RETURNS_META is provided for legacy compatibility (makes * driver behave as it did prior to v5.21) @@ -35,7 +35,7 @@ */ DEFINE('METACOLUMNS_RETURNS_ACTUAL', 0); DEFINE('METACOLUMNS_RETURNS_META', 1); - + /*-------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------*/ @@ -57,7 +57,7 @@ class ADODB_odbc extends ADOConnection { var $_autocommit = true; var $_lastAffectedRows = 0; var $uCaseTables = true; // for meta* functions, uppercase table names - + /* * Tells the metaColumns feature whether to return actual or meta type */ @@ -473,7 +473,7 @@ function MetaColumns($table, $normalize=true) $fld = new ADOFieldObject(); $fld->name = $rs->fields[3]; if ($this->metaColumnsReturnType == METACOLUMNS_RETURNS_META) - /* + /* * This is the broken, original value */ $fld->type = $this->ODBCTypes($rs->fields[4]); @@ -518,7 +518,6 @@ function Prepare($sql) return array($sql,$stmt,false); } - /* returns queryID or false */ function _query($sql,$inputarr=false) { $last_php_error = $this->resetLastError(); diff --git a/lib/adodb/drivers/adodb-oracle.inc.php b/lib/adodb/drivers/adodb-oracle.inc.php index 1a2735b1..dc0462fe 100644 --- a/lib/adodb/drivers/adodb-oracle.inc.php +++ b/lib/adodb/drivers/adodb-oracle.inc.php @@ -181,7 +181,6 @@ function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) } - // returns query ID if successful, otherwise false function _query($sql,$inputarr=false) { // Reset error messages before executing diff --git a/lib/adodb/drivers/adodb-pdo.inc.php b/lib/adodb/drivers/adodb-pdo.inc.php index 0fbe3e2f..d3ce12d0 100644 --- a/lib/adodb/drivers/adodb-pdo.inc.php +++ b/lib/adodb/drivers/adodb-pdo.inc.php @@ -578,7 +578,6 @@ function GenID($seqname='adodbseq',$startID=1) } - /* returns queryID or false */ function _query($sql,$inputarr=false) { $ok = false; diff --git a/lib/adodb/drivers/adodb-postgres64.inc.php b/lib/adodb/drivers/adodb-postgres64.inc.php index fa8e5fba..9bf9e713 100644 --- a/lib/adodb/drivers/adodb-postgres64.inc.php +++ b/lib/adodb/drivers/adodb-postgres64.inc.php @@ -258,7 +258,9 @@ function qStr($s, $magic_quotes=false) if ($this->_connectionID) { return "'" . pg_escape_string($this->_connectionID, $s) . "'"; } else { - return "'" . pg_escape_string($s) . "'"; + // Fall back to emulated escaping when there is no database connection. + // Avoids errors when using setSessionVariables() in the load balancer. + return parent::qStr( $s ); } } @@ -782,7 +784,6 @@ function _pconnect($str,$user='',$pwd='',$db='') } - // returns queryID or false function _query($sql,$inputarr=false) { $this->_pnum = 0; diff --git a/lib/adodb/drivers/adodb-postgres8.inc.php b/lib/adodb/drivers/adodb-postgres8.inc.php index 37c2aae1..58df47c6 100644 --- a/lib/adodb/drivers/adodb-postgres8.inc.php +++ b/lib/adodb/drivers/adodb-postgres8.inc.php @@ -45,11 +45,23 @@ class ADODB_postgres8 extends ADODB_postgres7 * @return int last inserted ID for given table/column, or the most recently * returned one if $table or $column are empty */ - protected function _insertID($table = '', $column = '') + protected function _insertID( $table = '', $column = '' ) { - return empty($table) || empty($column) - ? $this->GetOne("SELECT lastval()") - : $this->GetOne("SELECT currval(pg_get_serial_sequence('$table', '$column'))"); + global $ADODB_GETONE_EOF; + + $sql = empty($table) || empty($column) + ? 'SELECT lastval()' + : "SELECT currval(pg_get_serial_sequence('$table', '$column'))"; + + // Squelch "ERROR: lastval is not yet defined in this session" (see #978) + $result = @$this->GetOne($sql); + if ($result === false || $result == $ADODB_GETONE_EOF) { + if ($this->debug) { + ADOConnection::outp(__FUNCTION__ . "() failed : " . $this->errorMsg()); + } + return false; + } + return $result; } } diff --git a/lib/adodb/drivers/adodb-sqlanywhere.inc.php b/lib/adodb/drivers/adodb-sqlanywhere.inc.php index 88897af9..8d909fde 100644 --- a/lib/adodb/drivers/adodb-sqlanywhere.inc.php +++ b/lib/adodb/drivers/adodb-sqlanywhere.inc.php @@ -116,7 +116,7 @@ function load_blobvar_from_var($blobVarName, &$varName) { $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); */ - function UpdateBlob($table,$column,&$val,$where,$blobtype='BLOB') + function updateBlob($table, $column, $val, $where, $blobtype = 'BLOB') { $blobVarName = 'hold_blob'; $this->create_blobvar($blobVarName); diff --git a/lib/adodb/drivers/adodb-sqlite.inc.php b/lib/adodb/drivers/adodb-sqlite.inc.php index 0711f1dd..d41829c0 100644 --- a/lib/adodb/drivers/adodb-sqlite.inc.php +++ b/lib/adodb/drivers/adodb-sqlite.inc.php @@ -211,7 +211,6 @@ function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) return true; } - // returns query ID if successful, otherwise false function _query($sql,$inputarr=false) { $rez = sqlite_query($sql,$this->_connectionID); diff --git a/lib/adodb/drivers/adodb-sqlite3.inc.php b/lib/adodb/drivers/adodb-sqlite3.inc.php index 318171a8..7623a3c8 100644 --- a/lib/adodb/drivers/adodb-sqlite3.inc.php +++ b/lib/adodb/drivers/adodb-sqlite3.inc.php @@ -331,7 +331,6 @@ function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename); } - // returns query ID if successful, otherwise false function _query($sql,$inputarr=false) { $rez = $this->_connectionID->query($sql); diff --git a/lib/adodb/drivers/adodb-sybase.inc.php b/lib/adodb/drivers/adodb-sybase.inc.php index 5eb217a8..79fb82e8 100644 --- a/lib/adodb/drivers/adodb-sybase.inc.php +++ b/lib/adodb/drivers/adodb-sybase.inc.php @@ -170,7 +170,6 @@ function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) return true; } - // returns query ID if successful, otherwise false function _query($sql,$inputarr=false) { global $ADODB_COUNTRECS; diff --git a/lib/adodb/drivers/adodb-text.inc.php b/lib/adodb/drivers/adodb-text.inc.php index 77ad06a0..36a1a0d4 100644 --- a/lib/adodb/drivers/adodb-text.inc.php +++ b/lib/adodb/drivers/adodb-text.inc.php @@ -129,14 +129,21 @@ function Connect(&$array, $types = false, $colnames = false) return true; } - - - // returns queryID or false - // We presume that the select statement is on the same table (what else?), - // with the only difference being the order by. - //You can filter by using $eval and each clause is stored in $arr .eg. $arr[1] == 'name' - // also supports SELECT [DISTINCT] COL FROM ... -- only 1 col supported - function _query($sql,$input_arr,$eval=false) + /** + * Execute a query. + * + * We presume that the select statement is on the same table (what else?), + * with the only difference being the order by. + * You can filter by using $eval and each clause is stored in $arr e.g. $arr[1] == 'name' + * also supports SELECT [DISTINCT] COL FROM ... -- only 1 col supported + * + * @param string|array $sql Query to execute. + * @param array $inputarr An optional array of parameters. + * @param string $eval Optional eval string + * + * @return mixed|bool Query identifier or true if execution successful, false if failed. + */ + function _query($sql, $inputarr=false, $eval=false) { if ($this->_origarray === false) return false; diff --git a/lib/adodb/perf/perf-oci8.inc.php b/lib/adodb/perf/perf-oci8.inc.php index c11b261f..345d8929 100644 --- a/lib/adodb/perf/perf-oci8.inc.php +++ b/lib/adodb/perf/perf-oci8.inc.php @@ -23,7 +23,7 @@ if (!defined('ADODB_DIR')) die(); -class perf_oci8 extends ADODB_perf{ +class perf_oci8 extends adodb_perf{ var $noShowIxora = 15; // if the sql for suspicious sql is taking too long, then disable ixora diff --git a/lib/adodb/tohtml.inc.php b/lib/adodb/tohtml.inc.php index a36fdf6b..6e9a6286 100644 --- a/lib/adodb/tohtml.inc.php +++ b/lib/adodb/tohtml.inc.php @@ -141,7 +141,10 @@ function mime_content_type ($file) { default: if ($v) { - $v = htmlspecialchars(stripslashes(trim($v))); + $v = trim($v); + if ($htmlspecialchars) { + $v = htmlspecialchars($v); + } } elseif ($v === null) { $v = '(NULL)'; } else { From 37282180d720c5501bc585a48cce39fa93f45671 Mon Sep 17 00:00:00 2001 From: Phidias Chiang Date: Fri, 15 Mar 2024 04:43:16 +0800 Subject: [PATCH 13/14] Add MariaDB to README.html MariaDB is also supported and used by docker-compose, but isn't mentioned in the README.html. --- README.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.html b/README.html index 661b0530..c0b80185 100644 --- a/README.html +++ b/README.html @@ -289,7 +289,8 @@

System requirements

  • One of the following databases: MySQL - 3.x, 4.x or 5.x, PostgreSQL + 3.x, 4.x or 5.x, MariaDB 10.6+, + PostgreSQL 7.x or 8.x, Oracle 9i or 10g, IBM DB2 9.x, Microsoft SQL Server 2005 From 896ff7f5b96b3909087941557c7f49e793f3a8bb Mon Sep 17 00:00:00 2001 From: Greg Stoll Date: Sat, 12 Apr 2025 20:05:11 -0500 Subject: [PATCH 14/14] Add client_max_body_size to nginx docker config --- docker/nginx.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/nginx.conf b/docker/nginx.conf index 635ad547..ee37cfb2 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -1,5 +1,6 @@ server { listen 8000 default_server; + client_max_body_size 128M; root /app; index index.php index.html index.htm;