I'm trying to call a model from a controller and im obtaining the following Error:
 An uncaught Exception was encountered
 Type: Error
 Message: Call to undefined function ctype_digit()
 Filename: /var/www/localhost/htdocs/system/database/DB_driver.php
 Line Number: 1399
 Backtrace:
 File: /var/www/localhost/htdocs/application/models/M_rental.php
 Line: 8
 Function: get
 File: /var/www/localhost/htdocs/application/controllers/Admin.php
 Line: 23
 Function: get_data
 File: /var/www/localhost/htdocs/index.php
 Line: 315
 Function: require_once
I'm pretty new to CI, if anyone knows why this happens when I try to obtain the data from the database, feel free to post it, here's my code: Admin.php (Controller) function:
<?php
defined('BASEPATH') OR exit('no direct script access allowed');
class Admin extends CI_Controller{
 function __construct(){
     parent::__construct();
     $this->load->model('m_rental');
 }
 //This is the function for the admin dashboard display
 function index(){
     //some views loading fine.
 }
function car(){
  $data['car'] = $this->m_rental->get_data('car')->result();
  $this->load->view('admin/header');
  $this->load->view('admin/car',$data);
  $this->load->view('admin/footer');
}
Here's my model:
<?php
class M_rental extends CI_Model{
 function edit_data($where, $table){
     return $this->db->get_where($table,$where);
 }
 
 function get_data($table){
     return $this->db->get($table);
 }
 
 function insert_data($data, $table){
     $this->db->insert($table, $data);
 }
 
 function update_data($where, $data, $table){
     $this->db->where($where);
     $this->db->update($table, $data);
 }
 
 function delete_data($where, $table){
     $this->db->where($where);
     $this->db->delete($table);
 }
}
