Skip to content

PHP 8.3 compatibility resolved #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Lescript.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Lescript
// public $contact = array("mailto:cert-admin@example.com", "tel:+12025551212")

public $clientUserAgent = "analogic-lescript/0.3.0";

protected $certificatesDir;
protected $webRootDir;

Expand Down Expand Up @@ -130,7 +130,7 @@ function ($domain) {
$tokenPath = $directory . '/' . $challenge['token'];

if (!file_exists($directory) && !@mkdir($directory, 0755, true)) {
throw new RuntimeException("Couldn't create directory to expose challenge: ${tokenPath}");
throw new RuntimeException(sprintf("Couldn't create directory to expose challenge: %s", $tokenPath));
}

$header = array(
Expand All @@ -148,7 +148,7 @@ function ($domain) {
// 3. verification process itself
// -------------------------------

$uri = "http://${domain}/.well-known/acme-challenge/${challenge['token']}";
$uri = sprintf("http://%s/.well-known/acme-challenge/%s", $domain, $challenge['token']);

$this->log("Token for $domain saved at $tokenPath and should be available at $uri");
$this->log("Sending request to challenge");
Expand Down Expand Up @@ -183,7 +183,7 @@ function ($domain) {
throw new RuntimeException("Verification timed out");
}

$this->log("Verification ended with status: ${result['status']}");
$this->log(sprintf("Verification ended with status: %s", $result['status']));

@unlink($tokenPath);
}
Expand Down