A very strange error occurred in php!

藏色散人
Release: 2023-03-10 07:10:01
forward
1872 people have browsed it

This article introduces you to a very strange error in PHP. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

First of all, let’s take a look at what strange error is reported! ?

A very strange error occurred in php!

Argument 1 passed to admins\components\Answer::batchSaveItem() must be an instance of admins\components\int, integer given, called in admins/controllers/LibraryController.php on line 256 and defined
Copy after login

int Isn’t it a specified type? How can it be an instance? ? ?

The following is a summary of some solutions provided by online experts:

The first type:

The probability is to write a line at the top of the file use modules\answer\admin\components\int;

The second option:

is that the PHP version is too low and requires >= 7.0, you can see " https://3v4l.org/Tuqsn

Third option:

Delete the parameter type restriction and it has been restored!

....

Regarding this strange error report, everyone is welcome to leave a message for discussion!

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of A very strange error occurred in php!. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:learnku.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template