some reported warnings cleaned up
This commit is contained in:
		| @@ -207,7 +207,10 @@ function q($sql) { | |||||||
| 	unset($args[0]); | 	unset($args[0]); | ||||||
|  |  | ||||||
| 	if($db && $db->connected) { | 	if($db && $db->connected) { | ||||||
| 		$ret = $db->q(vsprintf($sql,$args)); | 		$stmt = vsprintf($sql,$args); | ||||||
|  | 		if($stmt === false) | ||||||
|  | 			logger('dba: vsprintf error: ' . print_r(debug_bracktrace(),true)); | ||||||
|  | 		$ret = $db->q($stmt); | ||||||
| 		return $ret; | 		return $ret; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -688,9 +688,9 @@ function diaspora_post($importer,$xml) { | |||||||
|  |  | ||||||
| 				// don't link tags that are already embedded in links | 				// don't link tags that are already embedded in links | ||||||
|  |  | ||||||
| 				if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body)) | 				if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body)) | ||||||
| 					continue; | 					continue; | ||||||
| 				if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body)) | 				if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body)) | ||||||
| 					continue; | 					continue; | ||||||
|  |  | ||||||
| 				$basetag = str_replace('_',' ',substr($tag,1)); | 				$basetag = str_replace('_',' ',substr($tag,1)); | ||||||
| @@ -853,9 +853,9 @@ function diaspora_reshare($importer,$xml) { | |||||||
|  |  | ||||||
| 				// don't link tags that are already embedded in links | 				// don't link tags that are already embedded in links | ||||||
|  |  | ||||||
| 				if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body)) | 				if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body)) | ||||||
| 					continue; | 					continue; | ||||||
| 				if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body)) | 				if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body)) | ||||||
| 					continue; | 					continue; | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -1094,9 +1094,9 @@ function diaspora_comment($importer,$xml,$msg) { | |||||||
|  |  | ||||||
| 				// don't link tags that are already embedded in links | 				// don't link tags that are already embedded in links | ||||||
|  |  | ||||||
| 				if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body)) | 				if(preg_match('/\[(.*?)' . preg_quote($tag,'/') . '(.*?)\]/',$body)) | ||||||
| 					continue; | 					continue; | ||||||
| 				if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body)) | 				if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag,'/') . '(.*?)\)/',$body)) | ||||||
| 					continue; | 					continue; | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -250,7 +250,7 @@ function email_header_encode($in_str, $charset) { | |||||||
|  |  | ||||||
|         // remove trailing spacer and |         // remove trailing spacer and | ||||||
|         // add start and end delimiters |         // add start and end delimiters | ||||||
|         $spacer = preg_quote($spacer); |         $spacer = preg_quote($spacer,'/'); | ||||||
|         $out_str = preg_replace("/" . $spacer . "$/", "", $out_str); |         $out_str = preg_replace("/" . $spacer . "$/", "", $out_str); | ||||||
|         $out_str = $start . $out_str . $end; |         $out_str = $start . $out_str . $end; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user