[php-src] Issue #7895: Uncaught TypeError: Unsupported operand types: string * string in
| From: | tolgahanacar | Date: | Thu, 06 Jan 2022 12:34:18 +0000 |
| Subject: | [php-src] Issue #7895: Uncaught TypeError: Unsupported operand types: string * string in | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-238801@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7895
Comment Author: tolgahanacar
$currency = json_decode(file_get_contents('https://api.example.com/embed/currency.json'),
true);
$value = $_POST['value']; // var_dump: string
$usd = $currency['USD']['sale']; // var_dump: string
echo $value * $usd; // output error
I also tried with PHP Version 8.1.0.