Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Deprecated: ucfirst(): Passing null to parameter #1 ($string) of type string is deprecated #3

Open
Klap-in opened this issue Nov 2, 2023 · 0 comments

Comments

@Klap-in
Copy link

Klap-in commented Nov 2, 2023

..../dokuwiki/lib/plugins/indexmenu$ ../../../bin/plugin.php dev addTest
PHP Deprecated:  ucfirst(): Passing null to parameter #1 ($string) of type string is deprecated in /home/gerrit/Sites/dokuwiki/dokuwiki/lib/plugins/dev/Skeletor.php on line 165
✓ .github/workflows/dokuwiki.yml created
✓ _test/GeneralTest.php created

case 'addTest':
$test = array_shift($args);
return $this->cmdAddTest($test);

dokuwiki-plugin-dev/cli.php

Lines 286 to 289 in 7c3b7a0

protected function cmdAddTest($test = '')
{
$skeletor = Skeletor::fromDir(getcwd());
$skeletor->addTest($test);

$test = ucfirst($test);

Probably the $this->args array which is used in cli.php is empty, and therefore resulting in a null. An option is casting to string?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant