<div dir="ltr"><div>Hi Everyone,<br></div><div><br></div><div>I am having this error that I could not solve myself. So, I need communities' help on it. </div><div><br></div><div>See, in `incident` table of error-reporting-server I added a new boolean field named `exception_type` to differentiate between js & php incidents (values meaning: 0:js, 1:php). I have attached the SQL file for the new database with this email. </div>
<div><br></div><div>Now, in generating the new schema I am getting following error. Kindly look at the attached image for full screenshot.</div><div><br></div><div>ERROR: </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class="" style="white-space:pre"> </span>PHP Parse error: syntax error, unexpected '[' in /var/www/error-reporting-server/app/Model/Report.php on line 310<br><span class="" style="white-space:pre"> </span>Parse error: syntax error, unexpected '[' in /var/www/error-reporting-server/app/Model/Report.php on line 310<br>
<span class="" style="white-space:pre"> </span>Fatal Error Error: syntax error, unexpected '[' in [/var/www/error-reporting-server/app/Model/Report.php, line 310]</blockquote><div><br></div><div><br></div><div><br>
</div><div>The error is in `Report::_findArrayList()` function. I could not find where that function is used. I also observed that this same error is occurring even without the new field `exception_type`. </div><div><br></div>
<div>This error can be regenerated by running following command for schema generation (with or without new field `incidents`.`exception_type`).</div><div><span class="" style="white-space:pre"> </span>> app/Console/cake schema generate</div>
<div><br></div><div><br></div><div>Also I have programmed the part where server accepts the bug-report submitted by PMA. Have a look at commit-0fabc21 [0]. I have commented on the line where I think the error is coming. It works fine in case a `closestReport` is found. But in case of adding a new `report` it shows this exact same error.</div>
<div><br></div><div><br></div><div>Please help me solve this error.</div><div><br></div><div>[0]: <a href="https://github.com/dhananjay92/error-reporting-server/commit/0fabc21">https://github.com/dhananjay92/error-reporting-server/commit/0fabc21</a></div>
<div><br></div><div><br></div><div>Regards,</div><div>Dhananjay Nakrani.</div></div>