Giter VIP home page Giter VIP logo

Comments (3)

tkudilsnetteam avatar tkudilsnetteam commented on July 19, 2024 3

Same happen if i upgrade php version to 7.3.

i found some way to fix it

go to:

vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php

find below:

private function prependMissingScheme($host) {    
    if (!filter_var($host, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)) {       
        $host = 'http://' . $host;    
    }    
    return $host;
}

replace to

private function prependMissingScheme($host)
{
     
      if (empty(parse_url($host, PHP_URL_SCHEME))) { 
         $host = 'http://' . $host; 
     } 

     return $host;
}

from plastic.

Ayesh avatar Ayesh commented on July 19, 2024 2

In PHP 7.3, these two flags are deprecated because they are already implied (since PHP 5.6). The ideal fix is to remove these flags. See php.watch's post about filter_var() deprecation warnings.

So the ideal fix would be replacing the following block with the block followed by it.

private function prependMissingScheme($host) {    
    if (!filter_var($host, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)) {       
        $host = 'http://' . $host;    
    }    
    return $host;
}

replace with this:

private function prependMissingScheme($host) {    
    if (!filter_var($host, FILTER_VALIDATE_URL)) {       
        $host = 'http://' . $host;    
    }    
    return $host;
}

from plastic.

intranets-talk avatar intranets-talk commented on July 19, 2024

Same here. I will do some digging on this, but would appreciate some pointers. I guess it has to do with Elastic updates on the system.

from plastic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.