Replies: 2 comments 8 replies
-
Need example failing code, probably. Per PHP docs about scope, using |
Beta Was this translation helpful? Give feedback.
8 replies
-
Regarding the On success, it returns 'keyword', 'shorturl', 'longurl', 'title', 'message', and 'statusCode'. But on failure, it returns 'keyword', 'message', and 'errorCode'. Shouldn't 'errorCode' be named 'statusCode' so that we can test for a single keyword? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to create some variables at the beginning of a plugin and then use then in my functions. But calling
global $var;
at the start of a function does nothing - the $var is not available to the function.If I define a CONSTANT, I can use that in the functions but I'm curious as to why a global $var isn't useable?
(I know some people don't like globals, but I don't mind them in a situation like this.)
Beta Was this translation helpful? Give feedback.
All reactions