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

Fatal error: Uncaught TypeError: Unsupported operand types: null & array #10

Open
cy-polo opened this issue Sep 1, 2022 · 6 comments
Open

Comments

@cy-polo
Copy link

cy-polo commented Sep 1, 2022

Hello,

I'm trying to configure a small AMF server in PHP, but I get an error that seems to come from SabreAMF that I don't understand, when creating the AMF server (new SabreAMF_Server()).
Can you please help me?

Here is what I do:

<?php

include "vendor/autoload.php";

$server = new SabreAMF_Server(); // Unsupported operand types: null & array 

Here is my error:


Fatal error: Uncaught TypeError: Unsupported operand types: null & array in D:\xampp\htdocs\vendor\sabre\amf\lib\SabreAMF\AMF0\Deserializer.php:129 Stack trace: #0 D:\xampp\htdocs\vendor\sabre\amf\lib\SabreAMF\AMF0\Deserializer.php(67): SabreAMF_AMF0_Deserializer->readArray() #1 D:\xampp\htdocs\vendor\sabre\amf\lib\SabreAMF\Message.php(146): SabreAMF_AMF0_Deserializer->readAMFData(10, true) #2 D:\xampp\htdocs\vendor\sabre\amf\lib\SabreAMF\Server.php(79): SabreAMF_Message->deserialize(Object(SabreAMF_InputStream)) #3 D:\xampp\htdocs\Gateway.php(23): SabreAMF_Server->__construct() #4 {main} thrown in D:\xampp\htdocs\vendor\sabre\amf\lib\SabreAMF\AMF0\Deserializer.php on line 129

Here is what the client sends:

image

Thank you in advance for your response, and I'm sorry to bother you if this is an old unmaintained project.

@evert
Copy link
Owner

evert commented Sep 1, 2022

Hi! It's been more than a decade since I worked on this. I no longer have the context to help. Whoever is interested in using this is probably on their own, but ill accept pull requests (mostly blindly)

@cy-polo
Copy link
Author

cy-polo commented Sep 2, 2022

Hello,

thank you for your answer, even if I'm annoyed that I can't solve this problem.
I understand that diving back into a project that can be used is no longer interesting.

Have a nice day!

@bastetcheat
Copy link

hey , could you find solution to read amf data of family farm ?

@evert
Copy link
Owner

evert commented Aug 3, 2023

@bastetcheat this library has nothing to do with farming.

@ROBERT-MCDOWELL
Copy link

@evert
family farm is a Flash game....

@evert
Copy link
Owner

evert commented Aug 3, 2023

ok, well that's still off-topic for this issue. Try to find a different venue for this question

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

4 participants