Skip to content

Commit aef152a

Browse files
committed
PHP7.4 deprecation warning fixes
1 parent eeb1d3e commit aef152a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dir2cast by Ben XO v1.15 (2019-12-15)
1+
dir2cast by Ben XO v1.16 (2019-12-15)
22
================================================================================
33

44
https://github.com/ben-xo/dir2cast/
@@ -151,6 +151,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
151151
HISTORY
152152
================================================================================
153153

154+
1.15 2019-12-16 Other fixes for PHP7.x
154155
1.15 2019-12-15 Upgrade getID3 to 1.9.18-201911300717 - fixes PHP7.4 support
155156
1.14 2019-12-12 Support for mp4 videos
156157
1.13 2019-12-11 Suppress deprecation warnings, as both dir2cast and getID3

dir2cast.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
/* DEFAULTS *********************************************/
5757

5858
// error handler needs these, so let's set them now.
59-
define('VERSION', '1.15');
59+
define('VERSION', '1.16');
6060
define('DIR2CAST_HOMEPAGE', 'https://github.com/ben-xo/dir2cast/');
6161
define('GENERATOR', 'dir2cast ' . VERSION . ' by Ben XO (' . DIR2CAST_HOMEPAGE . ')');
6262

@@ -69,7 +69,7 @@
6969

7070
/* EXTERNALS ********************************************/
7171

72-
function __autoload($class_name)
72+
function __autoloader($class_name)
7373
{
7474
switch(strtolower($class_name))
7575
{
@@ -87,6 +87,7 @@ function __autoload($class_name)
8787
require_once $class_name . '.php';
8888
}
8989
}
90+
spl_autoload_register('__autoloader');
9091

9192
/* CLASSES **********************************************/
9293

@@ -104,7 +105,7 @@ abstract class GetterSetter {
104105
public function __call($method, $params)
105106
{
106107
$var_name = substr($method, 3);
107-
$var_name{0} = strtolower($var_name{0});
108+
$var_name[0] = strtolower($var_name[0]);
108109
switch(strtolower(substr($method, 0, 3)))
109110
{
110111
case 'get':

0 commit comments

Comments
 (0)