clean ob only if is not empty
This commit is contained in:
parent
65b664b678
commit
90b6795f65
1 changed files with 4 additions and 1 deletions
|
@ -35,7 +35,10 @@ class Ajax
|
|||
}
|
||||
|
||||
public function json_response(){
|
||||
ob_clean();
|
||||
if(ob_get_length() > 0) {
|
||||
ob_clean();
|
||||
}
|
||||
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($this->_response);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue