aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseAction.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPDatabaseAction.m')
-rw-r--r--Source/SPDatabaseAction.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPDatabaseAction.m b/Source/SPDatabaseAction.m
index c7f5dbf9..413e2378 100644
--- a/Source/SPDatabaseAction.m
+++ b/Source/SPDatabaseAction.m
@@ -65,7 +65,10 @@
- (BOOL)createDatabase:(NSString *)database withEncoding:(NSString *)encoding collation:(NSString *)collation
{
- NSParameterAssert(database != nil && [database length] > 0);
+ if(![database length]) {
+ SPLog(@"'database' should not be nil or empty!");
+ return NO;
+ }
NSMutableString *query = [NSMutableString stringWithFormat:@"CREATE DATABASE %@", [database backtickQuotedString]];