Fix: ProcessQueue throws truncated incorrect decimal value #1083
Annotations
10 warnings
Classes/Converter/JsonCompatibilityConverter.php#L43
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
{
$decoded = '';
try {
- $decoded = json_decode($dataString, true, 512, JSON_THROW_ON_ERROR);
+ $decoded = json_decode($dataString, true, 511, JSON_THROW_ON_ERROR);
} catch (\JsonException) {
// Do nothing as we want to continue with unserialize as a test.
}
|
Classes/Converter/JsonCompatibilityConverter.php#L43
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
{
$decoded = '';
try {
- $decoded = json_decode($dataString, true, 512, JSON_THROW_ON_ERROR);
+ $decoded = json_decode($dataString, true, 513, JSON_THROW_ON_ERROR);
} catch (\JsonException) {
// Do nothing as we want to continue with unserialize as a test.
}
|
Classes/CrawlStrategy/GuzzleExecutionStrategy.php#L49
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
public function fetchUrlContents(UriInterface $url, string $crawlerId)
{
$reqHeaders = $this->buildRequestHeaders($crawlerId);
- $options = ['headers' => $reqHeaders];
+ $options = [];
if ($url->getUserInfo()) {
$options['auth'] = explode(':', $url->getUserInfo());
}
|
Classes/CrawlStrategy/GuzzleExecutionStrategy.php#L55
Escaped Mutant for Mutator "CatchBlockRemoval":
--- Original
+++ New
@@ @@
$url = (string) $url;
$response = $this->getResponse($url, $options);
return unserialize($response->getHeaderLine('X-T3Crawler-Meta'));
- } catch (RequestException $e) {
- $response = $e->getResponse();
- $message = ($response ? $response->getStatusCode() : 0) . chr(32) . ($response ? $response->getReasonPhrase() : $e->getMessage());
- $this->logger->debug(sprintf('Error while opening "%s" - ' . $message, $url), ['crawlerId' => $crawlerId]);
- return $message;
} catch (ConnectException $e) {
$message = $e->getCode() . chr(32) . $e->getMessage();
$this->logger->debug(sprintf('Error while opening "%s" - ' . $message, $url), ['crawlerId' => $crawlerId]);
|
Classes/CrawlStrategy/GuzzleExecutionStrategy.php#L97
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
*/
private function buildRequestHeaders(string $crawlerId) : array
{
- return ['Connection' => 'close', 'X-T3Crawler' => $crawlerId, 'User-Agent' => 'TYPO3 crawler'];
+ return ['X-T3Crawler' => $crawlerId, 'User-Agent' => 'TYPO3 crawler'];
}
}
|
Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L47
Escaped Mutant for Mutator "Ternary":
--- Original
+++ New
@@ @@
{
$configurationProvider ??= GeneralUtility::makeInstance(ExtensionConfigurationProvider::class);
$settings = $configurationProvider->getExtensionConfiguration();
- $this->extensionSettings = is_array($settings) ? $settings : [];
+ $this->extensionSettings = is_array($settings) ? [] : $settings;
}
/**
* Fetches a URL by calling a shell script.
|
Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L60
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
{
$url = (string) $url;
$parsedUrl = parse_url($url);
- if ($parsedUrl === false) {
+ if ($parsedUrl === true) {
$this->logger?->debug(sprintf('Could not parse_url() for string "%s"', $url), ['crawlerId' => $crawlerId]);
return false;
}
|
Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L70
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$this->logger?->debug(sprintf('Could not parse_url() for string "%s"', $url), ['crawlerId' => $crawlerId]);
return false;
}
- if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) {
+ if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['http', 'https'], true)) {
$this->logger?->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]);
return false;
}
|
Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L70
Escaped Mutant for Mutator "LogicalNot":
--- Original
+++ New
@@ @@
$this->logger?->debug(sprintf('Could not parse_url() for string "%s"', $url), ['crawlerId' => $crawlerId]);
return false;
}
- if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) {
+ if (isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) {
$this->logger?->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]);
return false;
}
|
Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L70
Escaped Mutant for Mutator "LogicalNot":
--- Original
+++ New
@@ @@
$this->logger?->debug(sprintf('Could not parse_url() for string "%s"', $url), ['crawlerId' => $crawlerId]);
return false;
}
- if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) {
+ if (!isset($parsedUrl['scheme']) || in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) {
$this->logger?->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]);
return false;
}
|
This job succeeded
Loading