Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Incorrect argument type definition in addHtml method #313

Open
@mskocik

Description

Version: latest

Bug Description

Method addHtml() has mixed type definition, which is incorrect. In fact it really expects HtmlStringable|string, because of inner call of ->insert().

(削除) The same applies to addText(). (削除ここまで)

Steps To Reproduce

Html::el('span')->addHtml(0); // results in following TypeError

TypeError Nette\Utils\Html::insert(): Argument #2 ($child) must be of type Nette\HtmlStringable|string, int given

Expected Behavior

No type error being thrown

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /