@halcyon Interesting client! I tried to run it but ran into a few issues on PHP 7.2. I didn't want to register on yet another website so here is a list of things I ran into:
* https://notabug.org/halcyon-suite/halcyon/src/master/authorize/mastodon-api/mastodon.php#L30 Assigning array values this way throws a warning and will return an error on later PHP versions.
* https://notabug.org/halcyon-suite/halcyon/src/master/login/auth.php#L26 Does no sanity checking and will emit a notice when the response does not match expectations.
* https://notabug.org/halcyon-suite/halcyon/src/master/authorize/mastodon-api/mastodon.php#L42 eval asking for trouble. You don't want to do that.
@nvsr I'm back from holidays and had a look at those problems but I have questions.
- This is the standard form of assigning a value to a associative array,isn't it?In which way should I do it if not in this?Using array_push() would only make sense for numbered arrays.
- Which form of sanity checking do you think I need at this point?First checking that $response exists and is an array,then checking that for ['html'] and so on?Or do you mean something else?
@nvsr I don't see a real difference between $parameters[CURLOPT_POSTFIELDS] = http_build_query($data); and $arr['foo'] = "bar";.As key I use a constant instead of a string and as a value I use a function instead of a string but both should be fine as far as I know.Can you please further explain where you locate the error?
For the second problem,I see what you mean and will do that.
@halcyon interestingly it seems that those constants were not defined when I ran the code. Oddly enough I do have curl enabled so I'll look into it some more after I get home from work.
@nvsr cURL option constants should be set by PHP automatically.You can find a list of them here: https://www.php.net/manual/en/function.curl-setopt.php
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!