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

Undefined offset: 0 #25

Closed
alberto-leon-crespo opened this issue Nov 28, 2016 · 3 comments
Closed

Undefined offset: 0 #25

alberto-leon-crespo opened this issue Nov 28, 2016 · 3 comments

Comments

@alberto-leon-crespo
Copy link

I have a error with arguments when i call to any method of telegram API that dont have arguments

$MadelineProto->contacts->getContacts();

Error:

  1. in vendor/danog/madelineproto/src/danog/MadelineProto/APIFactory.php at line 31 -
        set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']);
        $this->API->get_config();
        return $this->API->method_call($this->namespace.$name, is_array($arguments[0]) ? $arguments[0] : []);
        restore_error_handler();
    }
}
  1. at Exception ::ExceptionErrorHandler ('8', 'Undefined offset: 0', '/var/www/ezdesk/vendor/danog/madelineproto/src/danog/MadelineProto/APIFactory.php', '31', array('name' => 'getContacts', 'arguments' => array()))
    in vendor/danog/madelineproto/src/danog/MadelineProto/APIFactory.php at line 31 +

  2. at APIFactory ->__call ('getContacts', array())
    in src/AppBundle/Controller/DefaultController.php at line 61 +

  3. at DefaultController ->listContactsActon (object(Request))

  4. at call_user_func_array (array(object(DefaultController), 'listContactsActon'), array(object(Request)))
    in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php at line 153 +

  5. at HttpKernel ->handleRaw (object(Request), '1')
    in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php at line 68 +

  6. at HttpKernel ->handle (object(Request), '1', true)
    in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php at line 169 +

  7. at Kernel ->handle (object(Request))
    in web/app_dev.php at line 28 +

@danog
Copy link
Owner

danog commented Nov 28, 2016

As you can see in https://tjhorner.com/tl-schema/method/contacts.getContacts, contacts.getContacts requires a parameter (hash, which is described in the following way by https://core.telegram.org/method/contacts.getContacts: If there already is a full contact list on the client, an md5-hash of a comma-separated list of contact IDs in ascending order may be passed in this parameter. If the contact set was not changed, (contacts.contactsNotModified) will be returned.).
Also please always upload full MadelineProto logs to pastebin, or else I won't be able to fix anything.

@danog danog closed this as completed Nov 28, 2016
@alberto-leon-crespo
Copy link
Author

There is logs of problem.

http://pastebin.com/98UvpwuD

@danog
Copy link
Owner

danog commented Dec 2, 2016

Anyway, this bug should be now fixed.

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