Closed dregad closed 6 months ago
@dregad, without that change I am getting the following error: DEPRECATED 'Creation of dynamic property ADORecordSet_mysqli::$adodbFetchMode is deprecated' in '/var/www/html/mantistest/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php' line 930 Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section. While researching what to do ,I found a link which suggested this change. And it works for me (indeed running php 8.2) Hope this clarifies it. In case there is a better option, let me know. Kind regards, Cas
From: Damien Regad @.> Sent: Tuesday, 14 May 2024 13:34 To: mantisbt-plugins/Query @.> Cc: Cas Nuy @.>; State change @.> Subject: Re: [mantisbt-plugins/Query] Update README.MD (PR #4)
@dregad commented on this pull request.
In README.MDhttps://github.com/mantisbt-plugins/Query/pull/4#discussion_r1599864591:
+
+When using PHP 8.2 or later, a change is required to vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php
.
+Find the following lines
+
+```
+/*--------------------------------------------------------------------------------------
+--------------------------------------------------------------------------------------*/
+class ADORecordSet_mysqli extends ADORecordSet{
+```
+and make it look like this:
+```
+/*--------------------------------------------------------------------------------------
+--------------------------------------------------------------------------------------*/
+#[AllowDynamicProperties]
Can you please explain why this is necessary ?
It seems strange to me, that you would need to add custom properties to the ADOdb RecordSet object, which is normally abstracted behind the MantisBT database API.
— Reply to this email directly, view it on GitHubhttps://github.com/mantisbt-plugins/Query/pull/4#pullrequestreview-2055087278, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYLFFD7XKEXWW3JIEAGF5DZCHZDXAVCNFSM6AAAAABHUJNNU2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANJVGA4DOMRXHA. You are receiving this because you modified the open/close state.Message ID: @.**@.>>
without that change I am getting the following error: DEPRECATED 'Creation of dynamic property ADORecordSet_mysqli::$adodbFetchMode is deprecated' in '/var/www/html/mantistest/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php' line 930
What version of MantisBT and ADOdb you are using ?
Can you provide a full stack trace of the error (or steps to reproduce) ? I am not getting this (PHP 8.3, MantisBT 2.26.2, ADOdb 5.22.7) but maybe I'm not hitting the same code path.
Here is the trace: and here is the info of my environment:
Steps to reproduce are easy, try to execute a query without the statement added and the above error message will appear. With the statement added, it works normally.
MantisBT Version 2.26.0-dev
It would seem you are running an outdated development release of MantisBT...
You did not specify the ADOdb version as I requested so I can't say for sure, but to my knowledge this issue was fixed in v5.22.5 (04-Apr-2023), see https://github.com/ADOdb/ADOdb/issues/923, which is included in MantisBT 2.26.0.
Further PHP 8 compatibility issues were fixed in ADOdb v5.22.7 (MantisBT 2.26.1 and later).
Please upgrade to the latest version (2.26.2) and try again.
Updating the ADOdb module made it work, thanks for your analysis. Have updated the readme accordingly.
Add structure (titles/subtitles)
Fix Markdown formatting, typos.
About requirements section: I set 2.0.0 per the plugin's register() method, but probably a more recent version is required.