Skip to content

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

@Klap-in

Description

@Klap-in
..../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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions