• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What will be if ur models extends MY_Controller?

#1
Few days ago I was make some changes in my code before going to sleep.
By mistake I make this code: models extends MY_Controller.

MY_Controller have standart code:

class MY_Controller extends CI_Controller {
public data = array();
public function __construct()
{
parent::__construct();
$this->data['blabla'] = blabla;
}
}

I don't have xdebug, and when I was run php -S localhost:2222 (php version 5.5) I saw only one error "segmentation fault". If u try to search what this mean, u will find thousands answers how fix it. Some peoples recomend check memory or remove php-mysql.
xdebug don't help me fix errors, and I was researched all last modifed files to find my mistake.
Reply

#2
Don't waste your time trying to understand why it doesn't work and just fix your code. A model is not supposed to extend a controller. Also, I doubt the segmentation fault error is caused by your code. Because this error means PHP has crashed. It may be a bug in PHP itself or something is wrong with your server.
Reply

#3
(02-06-2015, 06:06 PM)includebeer Wrote: Don't waste your time trying to understand why it doesn't work and just fix your code. A model is not supposed to extend a controller. Also, I doubt the segmentation fault error is caused by your code. Because this error means PHP has crashed. It may be a bug in PHP itself or something is wrong with your server.

Sure u right. I just post this message for peoples, that like me have a bad luck. Smile
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.