joomla-extensions / patchtester

Patch testing extension for the Joomla! CMS
https://issues.joomla.org
GNU General Public License v2.0
48 stars 44 forks source link

php 81. deprecated #342

Closed alikon closed 2 years ago

alikon commented 2 years ago

Pull Request for Issue #341 .

Testing Instructions

see #341

toivo commented 2 years ago

Still showing at the top of the page:


( ! ) Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\www\joomla4test\libraries\src\MVC\Model\ListModel.php on line 586 -- 1 | 0.0002 | 364896 | {main}( ) | ...\index.php:0 2 | 0.0004 | 365664 | require_once( 'C:\www\joomla4test\administrator\includes\app.php ) | ...\index.php:32 3 | 0.0357 | 1078696 | Joomla\CMS\Application\CMSApplication->execute( ) | ...\app.php:63 4 | 0.0372 | 1167400 | Joomla\CMS\Application\AdministratorApplication->doExecute( ) | ...\CMSApplication.php:278 5 | 0.1059 | 2391344 | Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? ) | ...\AdministratorApplication.php:186 6 | 0.1100 | 2365200 | Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_patchtester', $params = ??? ) | ...\AdministratorApplication.php:143 7 | 0.1116 | 2387096 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch( ) | ...\ComponentHelper.php:389 8 | 0.1122 | 2403992 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure:C:\www\joomla4test\libraries\src\Dispatcher\LegacyComponentDispatcher.php:68-70}( $path = 'C:\\www\\joomla4test\\administrator/components/com_patchtester/patchtester.php' ) | ...\LegacyComponentDispatcher.php:71 9 | 0.1123 | 2404440 | require_once( 'C:\www\joomla4test\administrator\components\com_patchtester\patchtester.php ) | ...\LegacyComponentDispatcher.php:69 10 | 0.1128 | 2405112 | PatchTester\Controller\DisplayController->execute( ) | ...\patchtester.php:44 11 | 0.1152 | 2429560 | PatchTester\View\Pulls\PullsHtmlView->render( ) | ...\DisplayController.php:90 12 | 0.1152 | 2429560 | Joomla\CMS\MVC\Model\BaseModel->getState( $property = ???, $default = ??? ) | ...\PullsHtmlView.php:108 13 | 0.1152 | 2429560 | Joomla\CMS\MVC\Model\ListModel->populateState( $ordering = ???, $direction = ??? ) | ...\StateBehaviorTrait.php:58 14 | 0.1153 | 2429560 | strtoupper( $string = NULL )
toivo commented 2 years ago

The call stack inside the Fetch Data modal is different:

An error has occurred while fetching the data from GitHub.


( ! ) Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\www\joomla4test\libraries\src\MVC\Model\ListModel.php on line 586 -- 1 | 0.0002 | 365680 | {main}( ) | ...\index.php:0 2 | 0.0002 | 366448 | require_once( 'C:\www\joomla4test\administrator\includes\app.php ) | ...\index.php:32 3 | 0.0088 | 1080360 | Joomla\CMS\Application\CMSApplication->execute( ) | ...\app.php:63 4 | 0.0094 | 1169064 | Joomla\CMS\Application\AdministratorApplication->doExecute( ) | ...\CMSApplication.php:278 5 | 0.0672 | 2393008 | Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? ) | ...\AdministratorApplication.php:186 6 | 0.0687 | 2363696 | Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_patchtester', $params = ??? ) | ...\AdministratorApplication.php:143 7 | 0.0706 | 2387616 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch( ) | ...\ComponentHelper.php:389 8 | 0.0712 | 2404512 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure:C:\www\joomla4test\libraries\src\Dispatcher\LegacyComponentDispatcher.php:68-70}( $path = 'C:\\www\\joomla4test\\administrator/components/com_patchtester/patchtester.php' ) | ...\LegacyComponentDispatcher.php:71 9 | 0.0712 | 2404960 | require_once( 'C:\www\joomla4test\administrator\components\com_patchtester\patchtester.php ) | ...\LegacyComponentDispatcher.php:69 10 | 0.0715 | 2405600 | PatchTester\Controller\FetchController->execute( ) | ...\patchtester.php:44 11 | 0.0724 | 2428144 | PatchTester\Model\PullsModel->requestFromGithub( $page = 1 ) | ...\FetchController.php:56 12 | 0.2578 | 2408936 | Joomla\CMS\MVC\Model\BaseModel->getState( $property = ???, $default = ??? ) | ...\PullsModel.php:366 13 | 0.2578 | 2408936 | Joomla\CMS\MVC\Model\ListModel->populateState( $ordering = ???, $direction = ??? ) | ...\StateBehaviorTrait.php:58 14 | 0.2578 | 2408936 | strtoupper( $string = NULL ) | ...\ListModel.php:586 {"success":true,"message":"Processing page 2 of 3 pages of GitHub data","messages":null,"data":{"complete":false,"page":2,"lastPage":3}}

An error has occurred while fetching the data from GitHub. ( ! ) Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\www\joomla4test\libraries\src\MVC\Model\ListModel.php on line 586 Call Stack # Time Memory Function Location 1 0.0002 365680 {main}( ) ...\index.php:0 2 0.0002 366448 require_once( 'C:\www\joomla4test\administrator\includes\app.php ) ...\index.php:32 3 0.0088 1080360 Joomla\CMS\Application\CMSApplication->execute( ) ...\app.php:63 4 0.0094 1169064 Joomla\CMS\Application\AdministratorApplication->doExecute( ) ...\CMSApplication.php:278 5 0.0672 2393008 Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? ) ...\AdministratorApplication.php:186 6 0.0687 2363696 Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_patchtester', $params = ??? ) ...\AdministratorApplication.php:143 7 0.0706 2387616 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch( ) ...\ComponentHelper.php:389 8 0.0712 2404512 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure:C:\www\joomla4test\libraries\src\Dispatcher\LegacyComponentDispatcher.php:68-70}( $path = 'C:\\www\\joomla4test\\administrator/components/com_patchtester/patchtester.php' ) ...\LegacyComponentDispatcher.php:71 9 0.0712 2404960 require_once( 'C:\www\joomla4test\administrator\components\com_patchtester\patchtester.php ) ...\LegacyComponentDispatcher.php:69 10 0.0715 2405600 PatchTester\Controller\FetchController->execute( ) ...\patchtester.php:44 11 0.0724 2428144 PatchTester\Model\PullsModel->requestFromGithub( $page = 1 ) ...\FetchController.php:56 12 0.2578 2408936 Joomla\CMS\MVC\Model\BaseModel->getState( $property = ???, $default = ??? ) ...\PullsModel.php:366 13 0.2578 2408936 Joomla\CMS\MVC\Model\ListModel->populateState( $ordering = ???, $direction = ??? ) ...\StateBehaviorTrait.php:58 14 0.2578 2408936 [strtoupper](http://www.php.net/function.strtoupper)( $string = NULL ) ...\ListModel.php:586 {"success":true,"message":"Processing page 2 of 3 pages of GitHub data","messages":null,"data":{"complete":false,"page":2,"lastPage":3}}call stack displayed inside the Fetch Data modal is different:
N6REJ commented 2 years ago

The error listed with this pr no longer exists in patch_tester

An error has occurred while fetching the data from GitHub.

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in E:\Bearsampp\www\j4\libraries\src\MVC\Model\ListModel.php on line 543

Deprecated: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in E:\Bearsampp\www\j4\libraries\vendor\joomla\string\src\phputf8\mbstring\core.php on line 24

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in E:\Bearsampp\www\j4\libraries\src\HTML\Helpers\StringHelper.php on line 132
{"success":true,"message":"Processing page 2 of 3 pages of GitHub data","messages":null,"data":{"complete":false,"page":2,"lastPage":3}}
roland-d commented 2 years ago

@alikon There is a merge conflict due to the PSR-12 conversion, however I have also wrote in the issue that I cannot reproduce the issue on Joomla 4.2.3. Do you still get them?

alikon commented 2 years ago

no more