We decided to update php to version 5.6 (from 5.3) on the server - errors fell:
Catchable fatal error: Argument X passed ... must be integer, object given in ...
There were no such errors on the local Windows machine. Test way it was revealed that the problem is in the class name. If it starts with "Int ...", for example, Inter, the interpreter expected the type of Int in the function parameter. In general, the following code:
<?php class Inter { } function foo(Inter $p) { } $a = new Inter(); foo($a); echo 1; ?> Generates an error
mod_fcgid: stderr: PHP Catchable fatal error: Argument 1 passed to foo must be integer, object given in /.../test.php on line 6
If the class is called Stringer, we get
Argument 1 passed to foo must be string, object given
If the name is different, then there is no error, but renaming the class names in the project is not a solution.
class Inter { } function foo(Inter $p) { } $a = new Inter(); foo($a); echo 1; phpinfo();class Inter { } function foo(Inter $p) { } $a = new Inter(); foo($a); echo 1; phpinfo();...... everything works - Alexey Shimansky