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

PHP 8 deprecated warning on Syntax>Column #129

Open
@vanbe

Description

I recently upgrated to PHP 8.2, and getting warnings on Column->setAlias($alias) function line 115.

Code:

public function setAlias($alias)
 {
 if (0 == \strlen($alias)) {
 $this->alias = null;
 return $this;
 }
 if ($this->isAll()) {
 throw new QueryException("Can't use alias because column name is ALL (*)");
 }
 $this->alias = (string) $alias;
 return $this;
 }

Throws Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in ...app/Vendor/nilportugues/sql-query-builder/src/Syntax/Column.php on line 115

The strlen line should be:

if ($alias === null || 0 == \strlen($alias)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

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