clean ob only if is not empty

This commit is contained in:
Miroslav Šedivý 2019-12-23 20:19:56 +01:00
parent 65b664b678
commit 90b6795f65

View file

@ -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);
}