From 6b1b086cd39169d1cdf35c1e89251215ec09907d Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sun, 15 Aug 2010 13:06:10 +0000 Subject: =?UTF-8?q?=E2=80=A2=20made=20SP=20more=20robust=20against=20issue?= =?UTF-8?q?s=20which=20are=20caused=20by=20different=20table=20name=20enco?= =?UTF-8?q?dings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Frameworks/MCPKit') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index d8e43710..8ef0fb37 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -2306,9 +2306,13 @@ void performThreadedKeepAlive(void *ptr) return; } + if(![aTableDict objectForKey:@"name"]) continue; // Extract the name NSString *aTableName = [aTableDict objectForKey:@"name"]; + if(!aTableName) continue; + if(![aTableName isKindOfClass:[NSString class]]) continue; + if(![aTableName length]) continue; // Retrieve the column details NSString *query = [NSString stringWithFormat:@"SHOW FULL COLUMNS FROM `%@` FROM `%@`", [aTableName stringByReplacingOccurrencesOfString:@"`" withString:@"``"], -- cgit v1.2.3