We are in process of upgrading from php 5.6 to php 7.
We've been facing some very strange issues one of which is :
in the CI active record class - system\database\DB_active_rec.php - function _compile_select()
Context: User submits a login form with username and password, ajax request sent to the server.
This line of code behaves unexpectedly:
$sql .= implode(', ', $this->ar_select); // value of $this->ar_select is ['Type', 'Value']
If I change this to :
$str = implode(', ', $this->ar_select);
$sql .= $str;
it works fine.
When I say it doesn't work I mean there is no response from the server.Chrome network tab shows: (failed)net::ERR_EMPTY_RESPONSE
Tried placing the code in a try - catch but no exception were thrown. No errors in apache error_log.
In addition, why trying to debug, if I add an if condition without an else block, it doesn't work (i.e. not executing the block after if) even when the condition is evaluated to true.
Adding a non-empty else block gets it working where the code in the if condition runs.