• missing xbfish.com image

Tag Archives: Deprecated functions

Deprecated functions in CodeIgniter

Since PHP 5.3 was released to the public, its introduces two new error levels: E_DEPRECATED and E_USER_DEPRECATED.

The E_DEPRECATED error level is used to indicate that a function or feature has been deprecated. The E_USER_DEPRECATED level is intended for indicating deprecated features in user code, similarly to the E_USER_ERROR and E_USER_WARNING levels.

Henceforth, a lot of old PHP 4 functions are being deprecated, superseded by newer functions. Apparently, CodeIgniter 1.7.2 or older faced this irritating notice errors.

You may faced errors like such in the following:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Deprecated: Assigning the return value of new by reference is deprecated in C:\\XXXXX.php on line 130
 
Deprecated: Assigning the return value of new by reference is deprecated in C:\\XXXX.php on line 136
A PHP Error was encountered
 
Severity: 8192
 
Message: Function set_magic_quotes_runtime() is deprecated
 
Filename: codeigniter/CodeIgniter.php
 
Line Number: 60
A PHP Error was encountered
 
Severity: 8192
 
Message: Assigning the return value of new by reference is deprecated
 
Filename: libraries/Loader.php
 
Line Number: 255

To resolve these issues, just get the latest version of CodeIgniter (still version 1.7.2) from the SVN or re-download it @ the downloads page. Somehow, those deprecated functions were being replaced/fixed.