Jump to content


Photo

Parse error

Parse error:

  • Faça o login para participar
1 reply to this topic

#1 wmjulie

wmjulie

    Novato no fórum

  • Usuários
  • 1 posts
  • Sexo:Feminino
  • Localidade:São Paulo

Posted 04/04/2016, 15:34

Olá pessoal gostaria de resolver este erro em PHP:

 

Parse error: syntax error, unexpected '[', expecting ')' in /home/redec305/public_html/mcloud/core/classes/class.AJXP_Utils.php on line 1628

 

public function getSanitizedUrl($arr) {

        $credentials = join(':', array_filter([$arr['user'], $arr['pass']]));
        $hostname = join(':', array_filter([$arr['host'], $arr['port']]));
        $domain = join('@', array_filter([$credentials, $hostname]));
        return $arr['scheme'] . '://' . join('/', array_filter([$domain, $arr['path']]));
    }


#2 Goku Jr

Goku Jr

    Nilson

  • Usuários
  • 3757 posts
  • Sexo:Masculino

Posted 29/04/2016, 11:35

Ola, tudo bem?

 

Então o problema esta nos "array_filter" que você está utilizando....

Abaixo segue em negrito o que está errado.

 

array_filter([$arr['user'], $arr['pass']])

 

mais sobre a função: http://www.php.net/array_filter


-----------------------------------------------------------------------
PALMEIRAS - Primeiro campeão do mundo em 1951




0 user(s) are reading this topic

0 membro(s), 0 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq