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

#41 [Shortener] add: rework extrafields + lib #104

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nicolas-eoxia
Copy link
Member

No description provided.

@nicolas-eoxia nicolas-eoxia self-assigned this Feb 19, 2025
@nicolas-eoxia nicolas-eoxia added 2 Enhancement New feature or request labels Feb 19, 2025
* @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')

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);

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'])) {

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants