even with EMULATE_PREPARES=false, sqlite still returns strings for int columns...
This commit is contained in:
		
							parent
							
								
									fd2d434c61
								
							
						
					
					
						commit
						19c4fcaf34
					
				| @ -87,7 +87,6 @@ class Database | |||||||
|         $db_params = [ |         $db_params = [ | ||||||
|             PDO::ATTR_PERSISTENT => $ka, |             PDO::ATTR_PERSISTENT => $ka, | ||||||
|             PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, |             PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, | ||||||
|             PDO::ATTR_EMULATE_PREPARES => false,  # return native types
 |  | ||||||
|         ]; |         ]; | ||||||
|         $this->db = new PDO(DATABASE_DSN, $db_user, $db_pass, $db_params); |         $this->db = new PDO(DATABASE_DSN, $db_user, $db_pass, $db_params); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -81,9 +81,13 @@ class Image | |||||||
|             } |             } | ||||||
|             $this->locked = bool_escape($this->locked); |             $this->locked = bool_escape($this->locked); | ||||||
| 
 | 
 | ||||||
|             assert(is_int($this->id)); |             assert(is_numeric($this->id)); | ||||||
|             assert(is_int($this->height)); |             assert(is_numeric($this->height)); | ||||||
|             assert(is_int($this->width)); |             assert(is_numeric($this->width)); | ||||||
|  | 
 | ||||||
|  |             $this->id = int_escape($this->id); | ||||||
|  |             $this->height = int_escape($this->height); | ||||||
|  |             $this->width = int_escape($this->width); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user