try {
checkParam(newFolderName);
} catch (ConnectorException e) {
return e.getErrorCode();
}
<BUG>if (!checkIfTypeExists(this.type)) {

this.type = null;
</BUG>
return Constants.Errors.CKFINDER_CONNECTOR_ERROR_INVALID_TYPE;

try {
checkParam(newFolderName);
} catch (ConnectorException e) {
return e.getErrorCode();
