mirror of
https://codeberg.org/reflect/reflect-client-php.git
synced 2025-09-13 17:43:42 +02:00
fix: property access before initialization bug (#8)
This commit is contained in:
parent
25b5e2dad1
commit
b33a0e4979
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@
|
||||||
$this->key = $key;
|
$this->key = $key;
|
||||||
|
|
||||||
// Append tailing "/" if absent
|
// Append tailing "/" if absent
|
||||||
$this->base_url = substr($this->base_url, -1) === "/" ? $this->base_url : $this->base_url . "/";
|
$this->base_url = substr($base_url, -1) === "/" ? $base_url : $base_url . "/";
|
||||||
// Flag which enables or disables SSL peer validation (for self-signed certificates)
|
// Flag which enables or disables SSL peer validation (for self-signed certificates)
|
||||||
$this->https_verify_peer = $verify_peer;
|
$this->https_verify_peer = $verify_peer;
|
||||||
}
|
}
|
||||||
|
@ -84,9 +84,9 @@
|
||||||
// Create a new call to an endpoint
|
// Create a new call to an endpoint
|
||||||
public function call(string $endpoint): self {
|
public function call(string $endpoint): self {
|
||||||
// Remove leading "/" if present, as it's already present in $this->base_url
|
// Remove leading "/" if present, as it's already present in $this->base_url
|
||||||
$this->endpoint = substr($this->endpoint, 0, 1) !== "/"
|
$this->endpoint = substr($endpoint, 0, 1) !== "/"
|
||||||
? $this->endpoint
|
? $endpoint
|
||||||
: substr($this->endpoint, 1, strlen($this->endpoint) - 1);
|
: substr($endpoint, 1, strlen($endpoint) - 1);
|
||||||
|
|
||||||
// Reset search parameters
|
// Reset search parameters
|
||||||
$this->params();
|
$this->params();
|
||||||
|
|
Loading…
Add table
Reference in a new issue