<?php
$problem = new ApiProblem('0');
echo json_encode($problem, JSON_PRETTY_PRINT), PHP_EOL;
Expected:
{
"title": "0",
"type": "about:blank"
}
Returned:
{
"type": "about:blank"
}
The title property is missing because it is evaluated via PHP empty function. This should be replace by a strict comparison against empty string '' !==. when needed
Code to reproduce:
Expected:
Returned:
The
title
property is missing because it is evaluated via PHPempty
function. This should be replace by a strict comparison against empty string'' !==
. when needed