A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'city_id' of non-object

Filename: controllers/Nekretnina.php

Line Number: 24

Backtrace:

File: /home/proagent/public_html/application/controllers/Nekretnina.php
Line: 24
Function: _error_handler

File: /home/proagent/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'type' of non-object

Filename: controllers/Nekretnina.php

Line Number: 24

Backtrace:

File: /home/proagent/public_html/application/controllers/Nekretnina.php
Line: 24
Function: _error_handler

File: /home/proagent/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'object_type' of non-object

Filename: controllers/Nekretnina.php

Line Number: 24

Backtrace:

File: /home/proagent/public_html/application/controllers/Nekretnina.php
Line: 24
Function: _error_handler

File: /home/proagent/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'price' of non-object

Filename: controllers/Nekretnina.php

Line Number: 24

Backtrace:

File: /home/proagent/public_html/application/controllers/Nekretnina.php
Line: 24
Function: _error_handler

File: /home/proagent/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

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

Filename: core/Common.php

Line Number: 570

Backtrace:

File: /home/proagent/public_html/application/models/Ad.php
Line: 172
Function: get

File: /home/proagent/public_html/application/controllers/Nekretnina.php
Line: 24
Function: getRecommendedAds

File: /home/proagent/public_html/index.php
Line: 315
Function: require_once

Database Error

A Database Error Occurred

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 '`NULL` AND `t1`.`price` > `IS` `NULL` AND `t1`.`type` IS NULL AND `t1`.`city_id`' at line 11

SELECT `t1`.`id`, `t1`.`user_id`, `t1`.`type`, `t1`.`agency_ad_id`, `t1`.`active`, `t1`.`object_type`, `t1`.`structure`, `t1`.`title`, `t1`.`street`, `t1`.`flat`, `t1`.`city_id`, `t1`.`city_part_id`, `t1`.`description`, `t1`.`surface`, `t1`.`price`, `t1`.`furnished`, `t1`.`heating`, `t1`.`lat`, `t1`.`lng`, `t1`.`kitchen_elements`, `t1`.`storage`, `t1`.`washing_machine`, `t1`.`tv`, `t1`.`air_condition`, `t1`.`intercom`, `t1`.`cable_tv`, `t1`.`internet`, `t1`.`video_surveillance`, `t1`.`garage`, `t1`.`parking`, `t1`.`basement`, `t1`.`terrace`, `t1`.`elevator`, `t1`.`new_construction`, `t1`.`old_construction`, `t1`.`original_construction`, `t1`.`duplex`, `t1`.`lux`, `t1`.`renovated`, `t1`.`filed`, `t1`.`into_construction`, `t1`.`ready_to_move`, `t1`.`date_created`, `t1`.`date_updated`, `t2`.`name` as `city_name`, `t3`.`name` as `city_part_name`, `t3`.`url` as `city_part_url`, CONCAT('https://proagent.rs/public/assets/images/photos/', `t1`.`id`, '/', `t1`.`id`, '_flagship.') as flagship_img, CONCAT('public/assets/images/photos/', `t1`.`id`, '/', `t1`.`id`, '_flagship.') as flagship_img_rel_path, ( select CONCAT('https://proagent.rs/public/assets/images/photos/', `t1`.`id`, '/', `t11`.`name`, '.', t11.extension) as full_url from ads_photos as t11 where t11.ad_id = t1.id and t11.flagship = 1 limit 1 ) as flagship_img_original, ( select extension as extension from ads_photos as t10 where t10.ad_id = t1.id and t10.flagship = 1 limit 1 ) as extension, concat('https://proagent.rs/nekretnina/', t1.id) as url FROM `ads` as `t1` LEFT JOIN `cities` as `t2` ON `t1`.`city_id` = `t2`.`id` LEFT JOIN `city_parts` as `t3` ON `t1`.`city_part_id` = `t3`.`id` WHERE `t1`.`price` < `IS` `NULL` AND `t1`.`price` > `IS` `NULL` AND `t1`.`type` IS NULL AND `t1`.`city_id` IS NULL AND `t1`.`object_type` IS NULL AND `t1`.`active` = 1 AND `t1`.`id` != '1941' ORDER BY RAND() LIMIT 2

Filename: models/Ad.php

Line Number: 172