Skip to content

Commit d264c2d

Browse files
committed
Fixes backward incompatibility caused by the upgrade from CI 3.1 to 3.2-dev.
1 parent 274a7be commit d264c2d

File tree

3 files changed

+65
-3
lines changed

3 files changed

+65
-3
lines changed

readme.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
What is this repository?
33
########################
44

5-
This is a fork of CodeIgniter 3, with the goal of keeping it up to date with PHP 8.2 and beyond. There is no intention to add new features or change the way CI3 works. This is purely a maintenance fork.
5+
This is a fork of CodeIgniter 3, with the goal of keeping it up to date with PHP 8.3 and beyond. There is no intention to add new features or change the way CI3 works. This is purely a maintenance fork.
66

7-
The original CodeIgniter 3.x branch is no longer maintained, and has not been updated to work with PHP 8.2 or newer. This fork is intended to fill that gap.
7+
The original CodeIgniter 3.x branch is no longer maintained, and has not been updated to work with PHP 8.2 (or 8.3). This fork is intended to fill that gap.
88

9-
If the original CodeIgniter 3.x branch is updated to work with PHP 8.2 or newer, and starts to be maintained again, this fork might be retired.
9+
If the original CodeIgniter 3.x branch is updated to work with PHP 8.3 or newer, and starts to be maintained again, this fork might be retired.
1010

1111
****************
1212
Issues and Pulls

system/core/Router.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,19 @@ public function set_class($class)
446446

447447
// --------------------------------------------------------------------
448448

449+
/**
450+
* Fetch the current class
451+
*
452+
* @deprecated 3.0.0 Read the 'class' property instead
453+
* @return string
454+
*/
455+
public function fetch_class()
456+
{
457+
return $this->class;
458+
}
459+
460+
// --------------------------------------------------------------------
461+
449462
/**
450463
* Set method name
451464
*
@@ -459,6 +472,19 @@ public function set_method($method)
459472

460473
// --------------------------------------------------------------------
461474

475+
/**
476+
* Fetch the current method
477+
*
478+
* @deprecated 3.0.0 Read the 'method' property instead
479+
* @return string
480+
*/
481+
public function fetch_method()
482+
{
483+
return $this->method;
484+
}
485+
486+
// --------------------------------------------------------------------
487+
462488
/**
463489
* Set directory name
464490
*
@@ -477,4 +503,21 @@ public function set_directory($dir, $append = FALSE)
477503
$this->directory .= str_replace('.', '', trim($dir, '/')).'/';
478504
}
479505
}
506+
507+
// --------------------------------------------------------------------
508+
509+
/**
510+
* Fetch directory
511+
*
512+
* Feches the sub-directory (if any) that contains the requested
513+
* controller class.
514+
*
515+
* @deprecated 3.0.0 Read the 'directory' property instead
516+
* @return string
517+
*/
518+
public function fetch_directory()
519+
{
520+
return $this->directory;
521+
}
522+
480523
}

system/helpers/file_helper.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@
5050

5151
// ------------------------------------------------------------------------
5252

53+
if ( ! function_exists('read_file'))
54+
{
55+
/**
56+
* Read File
57+
*
58+
* Opens the file specified in the path and returns it as a string.
59+
*
60+
* @deprecated 3.0.0 It is now just an alias for PHP's native file_get_contents().
61+
* @param string $file Path to file
62+
* @return string File contents
63+
*/
64+
function read_file($file)
65+
{
66+
return @file_get_contents($file);
67+
}
68+
}
69+
70+
// ------------------------------------------------------------------------
71+
5372
if ( ! function_exists('write_file'))
5473
{
5574
/**

0 commit comments

Comments
 (0)