A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/Produkty.php

Line Number: 79

Backtrace:

File: /application/controllers/Produkty.php
Line: 79
Function: _error_handler

File: /index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type null

Filename: controllers/Produkty.php

Line Number: 79

Backtrace:

File: /application/controllers/Produkty.php
Line: 79
Function: _error_handler

File: /index.php
Line: 318
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /system/core/Exceptions.php:271)

Filename: core/Common.php

Line Number: 570

Backtrace:

File: /application/models/Produkty_model.php
Line: 64
Function: get

File: /application/controllers/Produkty.php
Line: 94
Function: get_produkt

File: /index.php
Line: 318
Function: require_once

Database Error

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AS ocena FROM `produkty` WHERE `produkt_id` IS NULL AND `aktywny` = '1'' at line 1

SELECT *, (SELECT AVG(reviews.rating) FROM reviews WHERE reviews.reference_type='produkty' AND reviews.reference_id=) AS ocena FROM `produkty` WHERE `produkt_id` IS NULL AND `aktywny` = '1'

Filename: models/Produkty_model.php

Line Number: 64