Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 passed to mysql_free_result() must be an instance of mysqli_result, boolean given #12

Open
Reael opened this issue Jan 29, 2021 · 1 comment

Comments

@Reael
Copy link

Reael commented Jan 29, 2021

Whole Error:

Fatal error: Uncaught TypeError: Argument 1 passed to mysql_free_result() must be an instance of mysqli_result, boolean given, called in /home/httpd/[...]/functions.php on line 478 and defined in /home/httpd/[...]/mysql.php:284 Stack trace: #0 /home/httpd/[...]/functions.php(478): mysql_free_result(true) #1 /home/httpd/[...]/chat.php(25): aktualisiere_online('43', '19', 0) #2 {main} thrown in /home/httpd/[...]/mysql.php on line 284

since the site is in german: "aktualisiere_online" means "update_online"

I've been using the wrapper for our chat and if I just simply delete the line in the "function" script encountering in the error there is no error anymore, but I also can't type anything in the chat despite it running smoothly and looking all good otherwise. Now the not-being-able-to-type-issue could be somewhere else but I can't rule it out with this error.
The line given in my "functions" script:
@mysql_free_result($result); - Line 478

The line given in my "chat" script:
aktualisiere_online($u_id,$o_raum,0); -Line 25

referring to this line from mysql.php
mysqli_free_result($result); - Line 284

I have no understanding of php what so ever (the little things I know is from like 10 lessons of learning C# - 10 years ago in university), I know more or less how scripts work together but I really only need the wrapper to bypass the time till I find someone to re-write the whole chat. So if there is any solution to this I'd appreciate it if someone would explain it to me like they'd explain it to a toddler :(

@MpunktMpunkt
Copy link

Thx a lot for you work writing this wrapper.

I got a similiar error to the one in here:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to mysql_free_result() must be an instance of mysqli_result, null given

I changed #284 to this:
function mysql_free_result($result)

which solved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants