File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -106,16 +106,23 @@ public function login () {
106106 curl_setopt ($ prox_ch , CURLOPT_POST , true );
107107 curl_setopt ($ prox_ch , CURLOPT_RETURNTRANSFER , true );
108108 curl_setopt ($ prox_ch , CURLOPT_POSTFIELDS , $ login_postfields_string );
109- curl_setopt ($ prox_ch , CURLOPT_SSL_VERIFYPEER , false );
109+ curl_setopt ($ prox_ch , CURLOPT_SSL_VERIFYPEER , false ); // true = verify SSL certificate
110110
111111 $ login_ticket = curl_exec ($ prox_ch );
112112
113113 curl_close ($ prox_ch );
114114 unset($ prox_ch );
115115 unset($ login_postfields_string );
116116
117+ if ( !$ login_ticket )
118+ {
119+ // Wrong SSL / connection timed out
120+ $ this ->pve_login_ticket_timestamp = null ;
121+ return false ;
122+ }
123+
117124 $ login_ticket_data = json_decode ($ login_ticket , true );
118- if ($ login_ticket_data == null ) {
125+ if ($ login_ticket_data == null || $ login_ticket_data [ ' data ' ] == null ) {
119126 # Login failed.
120127 # Just to be safe, set this to null again.
121128 $ this ->pve_login_ticket_timestamp = null ;
You can’t perform that action at this time.
0 commit comments