This repository was archived by the owner on Sep 15, 2025. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed 
Sources/WordPressKit/Models Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -250,13 +250,17 @@ public class RemoteBlogSettings: NSObject {
250250        timezoneString =  rawSettings [ CodingKeys . timezoneString. rawValue]  as?  String 
251251
252252        defaultCategoryID =  rawSettings [ CodingKeys . defaultCategory. rawValue]  as?  NSNumber  ??  1 
253+ 
254+         // Note: the backend might send '0' as a number, OR a string value.
255+         // See https://github.com/wordpress-mobile/WordPress-iOS/issues/4187
253256        let  defaultPostFormatValue  =  rawSettings [ CodingKeys . defaultPostFormat. rawValue] 
254257        if  let  defaultPostFormatNumber =  defaultPostFormatValue as?  NSNumber ,  defaultPostFormatNumber ==  0  ||
255258           defaultPostFormatValue as?  String  ==  " 0 "  { 
256259            defaultPostFormat =  " standard " 
257260        }  else  { 
258261            defaultPostFormat =  defaultPostFormatValue as?  String 
259262        } 
263+ 
260264        dateFormat =  rawSettings [ CodingKeys . dateFormat. rawValue]  as?  String 
261265        timeFormat =  rawSettings [ CodingKeys . timeFormat. rawValue]  as?  String 
262266        startOfWeek =  rawSettings [ CodingKeys . startOfWeek. rawValue]  as?  String 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments