Plugin Directory

Changeset 2818251


Ignore:
Timestamp:
11/15/2022 12:23:21 PM (2 years ago)
Author:
sebastopolys
Message:

add WP API Error message

Location:
maldita-inflacion
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • maldita-inflacion/tags/1.0.0/readme.txt

    r2809334 r2818251  
    44Donate link: https://paypal.me/sebastopolys/
    55Requires at least: 4.0.9
    6 Tested up to: 6.0
     6Tested up to: 6.1
    77Requires PHP: 7.4
    88Stable tag: 1.0.0
     
    5959* Version inicial
    6060
     61=1.0.1=
     62* Error de WP API se muestra en pantalla
    6163
     64
     65
  • maldita-inflacion/tags/1.0.0/src/apilog/malinf-malinfResponse.php

    r2809228 r2818251  
    1010   
    1111    public function call($bkop){
    12         $res = wp_remote_get($this->apiurl );     
    13         $resp = json_decode($res['body']);     
     12        $res = wp_remote_get($this->apiurl );
     13        if(is_wp_error($res)){
     14            echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ". $res->get_error_message();
     15            return null;
     16        }
     17        $resp = json_decode($res['body']);       
    1418        if(null!==json_decode($bkop)->tipodc&&$res['response']['code']==200){
    1519            $bktp =   json_decode($bkop)->tipodc;
  • maldita-inflacion/trunk/readme.txt

    r2809334 r2818251  
    44Donate link: https://paypal.me/sebastopolys/
    55Requires at least: 4.0.9
    6 Tested up to: 6.0
     6Tested up to: 6.1
    77Requires PHP: 7.4
    88Stable tag: 1.0.0
     
    5959* Version inicial
    6060
     61=1.0.1=
     62* Error de WP API se muestra en pantalla
    6163
     64
  • maldita-inflacion/trunk/src/apilog/malinf-malinfResponse.php

    r2809228 r2818251  
    1010   
    1111    public function call($bkop){
    12         $res = wp_remote_get($this->apiurl );     
    13         $resp = json_decode($res['body']);     
     12        $res = wp_remote_get($this->apiurl );
     13        if(is_wp_error($res)){
     14            echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ". $res->get_error_message();
     15            return null;
     16        }
     17        $resp = json_decode($res['body']);         
    1418        if(null!==json_decode($bkop)->tipodc&&$res['response']['code']==200){
    1519            $bktp =   json_decode($bkop)->tipodc;
Note: See TracChangeset for help on using the changeset viewer.