Changeset 4610 for extensions


Ignore:
Timestamp:
Jan 4, 2010, 12:10:11 AM (15 years ago)
Author:
ronosman
Message:

Bug 1362 fixed : cannot connect to Piwigo when hosted by free.fr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/PWG/WebServices.pm

    r4586 r4610  
    169169
    170170    if($self->uagent_response->is_success){
    171         # when server response has warnings, the content response is not a valid json string
    172                 # find the json response
    173         $self->uagent_response->content =~ /(\{.+\})/;
    174                 #printf("json response %s\n", $1);
    175171        eval {
    176172            $hresult = from_json(
    177                 $1
     173                $self->uagent_response->content
    178174            );
    179175        };
    180                
     176                if($@){
     177            # when server response has warnings, the content response is not a valid json string
     178                    # find the json response
     179            $self->uagent_response->content =~ /(\{.+\})/;
     180                    #printf("json response %s\n", $1);
     181            eval {
     182                $hresult = from_json(
     183                    $1
     184                );
     185            };
     186        }               
    181187    }
    182188    else{
Note: See TracChangeset for help on using the changeset viewer.