KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

HTTP 500 Error #996

Closed ATM opened this topic on on Jul 18, 2019 - 2 comments

ATM commented on Jul 18, 2019

I've been trying to install Koolreports on my webserver however I keep getting an HTTP 500 error when trying to access the pages.

when looking at the error_log i found the below error: PHP Parse error: syntax error, unexpected '[', expecting ']' in /koolreport/core/src/core/DataStore.php on line 694

any idea whats the reason of this error?

KoolReport commented on Jul 19, 2019

It seems a bug, please help to change to:

    public function toTableArray()
    {
        if ($this->count()>0) {
            $result = array(
                array_keys($this->data[0])
            );
            
            foreach ($this->data as $rows) {
                array_push($result, array_values($row));
            }
            return $result;
        }
        return [
            array_keys($this->meta["columns"])
        ];
    }

ATM commented on Jul 19, 2019

great, its working fine now!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

None