Welcome Guest, Not a member yet? Register   Sign In
Problem with POST data types
#4

(This post was last modified: 04-08-2024, 01:50 AM by kenjis.)

It was converted to int implicitly by PHP.
But in 4.5.0 "declare(strict_types=1);" has been added to most of the framework codebase.
See https://www.php.net/manual/en/language.t...ons.strict
Because if devs expect int values, string values should not pass the validation.

So now it is not converted implicitly, and causes TypeError.

> Sorry this is not a bug, but an intended behavior of PHP.

This sentence was not precise. PHP's default behavior is to convert implicitly,
but now we use strict mode for strict type coding.
Reply


Messages In This Thread
Problem with POST data types - by motoroller - 04-07-2024, 05:39 PM
RE: Problem with POST data types - by kenjis - 04-07-2024, 07:23 PM
RE: Problem with POST data types - by motoroller - 04-08-2024, 12:20 AM
RE: Problem with POST data types - by kenjis - 04-08-2024, 01:47 AM
RE: Problem with POST data types - by motoroller - 04-08-2024, 08:55 AM
RE: Problem with POST data types - by kenjis - 04-08-2024, 01:55 PM
RE: Problem with POST data types - by motoroller - 04-10-2024, 01:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB