Curl Response Refactoring
- refactored Network::getCurl() - replaced every Network::getCur() execution with a Curl Response
This commit is contained in:
		
					parent
					
						
							
								7c73e8634c
							
						
					
				
			
			
				commit
				
					
						ffbc688797
					
				
			
		
					 9 changed files with 30 additions and 30 deletions
				
			
		| 
						 | 
				
			
			@ -86,13 +86,14 @@ class PortableContact
 | 
			
		|||
 | 
			
		||||
		logger('load: ' . $url, LOGGER_DEBUG);
 | 
			
		||||
 | 
			
		||||
		$s = Network::fetchUrl($url);
 | 
			
		||||
		$fetchresult = Network::fetchUrlFull($url);
 | 
			
		||||
		$s = $fetchresult->getBody();
 | 
			
		||||
 | 
			
		||||
		logger('load: returns ' . $s, LOGGER_DATA);
 | 
			
		||||
 | 
			
		||||
		logger('load: return code: ' . Network::getCurl()->getCode(), LOGGER_DEBUG);
 | 
			
		||||
		logger('load: return code: ' . $fetchresult->getReturnCode(), LOGGER_DEBUG);
 | 
			
		||||
 | 
			
		||||
		if ((Network::getCurl()->getCode() > 299) || (! $s)) {
 | 
			
		||||
		if (($fetchresult->getReturnCode() > 299) || (! $s)) {
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue