You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error:
Fatal error: Default value for parameters with a class type can only be NULL in D:\xampp\htdocs\cargo-label\vendor\simitgroup\phpjasperxml\src\Tools\Toolbox.php on line 49
It's a simple report file with no parameters
My php version:
D:\xampp\htdocs\cargo-label>php -v
PHP 7.4.30 (cli) (built: Jun 7 2022 16:24:55) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
I am trying to locate the "sample.jrxml" file referred to in the readme so that we can carry out a simple test. It does not appear to be in the example folder.
Version since version 2.1 tested in php 8.2 and we use it right now. I notice so sure what happen to you. However, I notice u use php 7.4. You may try to use php 8.1 or 8.2 test again?
Thank you I will try version 8.
I asked AI to analyse toolbox.php and got these results
In your Toolbox.php trait, the following functions define parameters with a mixed type hint and default values:
public function console(mixed $txt='')
public function failed(mixed $txt='')
This violates PHP's rules, as default values for typed parameters can only be NULL.
Activity
kstan79 commentedon May 27, 2025
Php 8 should able to run. It supported since long time ago
malcolmfowler commentedon May 27, 2025
I'm getting this error:
Fatal error: Default value for parameters with a class type can only be NULL in D:\xampp\htdocs\cargo-label\vendor\simitgroup\phpjasperxml\src\Tools\Toolbox.php on line 49
It's a simple report file with no parameters
My php version:
D:\xampp\htdocs\cargo-label>php -v
PHP 7.4.30 (cli) (built: Jun 7 2022 16:24:55) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
kstan79 commentedon May 27, 2025
You may try with the example in this project. Compare the php source code with yours
malcolmfowler commentedon May 29, 2025
I am trying to locate the "sample.jrxml" file referred to in the readme so that we can carry out a simple test. It does not appear to be in the example folder.
kstan79 commentedon May 29, 2025
Version since version 2.1 tested in php 8.2 and we use it right now. I notice so sure what happen to you. However, I notice u use php 7.4. You may try to use php 8.1 or 8.2 test again?
malcolmfowler commentedon May 29, 2025
Thank you I will try version 8.
I asked AI to analyse toolbox.php and got these results
In your Toolbox.php trait, the following functions define parameters with a mixed type hint and default values:
public function console(mixed $txt='')
public function failed(mixed $txt='')
This violates PHP's rules, as default values for typed parameters can only be NULL.
kstan79 commentedon May 30, 2025
O k you may send pr