-
Notifications
You must be signed in to change notification settings - Fork 7
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
#41 [Shortener] add: rework extrafields + lib #104
base: develop
Are you sure you want to change the base?
#41 [Shortener] add: rework extrafields + lib #104
Conversation
* @return CurlHandle|false $ch cURL handle on success, false on errors | ||
* @param array $curlPostFields cURL post fields | ||
* @param string $urlMethod Url method | ||
* @return int|stdClass 0 < on error, data object on success | ||
*/ | ||
function init_easy_url_curl(array $curlPostFields, string $urlMethod = 'yourls') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peut être la fonction parce que init curl ça peut vouloir dire que tu init juste l'objet curl sans faire la requête alors là tu fais la requête.
Suggestion : easy_url_post
comme nouveau nom de fonction ?
// Fetch and return content | ||
$data = curl_exec($ch); | ||
curl_close($ch); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rajouter une gestion d'erreur parce que si il y a une erreur il a peut être pas forcément de body en json
foreach ($objects as $object) { | ||
$urlTypes = ['signature', 'payment']; | ||
foreach ($urlTypes as $urlType) { | ||
if (isset($object->array_options['options_easy_url_' . $urlType . '_link']) && !empty($object->array_options['options_easy_url_' . $urlType . '_link'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi ne pas utiliser !empty()
pour les deux
No description provided.