Skip to content

Commit 7294d40

Browse files
committed
Remove deprecated close and free functions
1 parent 131edbf commit 7294d40

6 files changed

Lines changed: 1 addition & 24 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"source": "https://github.com/bcit-ci/CodeIgniter"
1212
},
1313
"require": {
14-
"php": ">=7.4"
14+
"php": ">=8.0"
1515
},
1616
"scripts": {
1717
"test:coverage": [

system/helpers/captcha_helper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,6 @@ function create_captcha($data = '', $img_path = '', $img_url = '', $font_path =
346346
}
347347

348348
$img = '<img '.($img_id === '' ? '' : 'id="'.$img_id.'"').' src="'.$img_url.$img_filename.'" style="width: '.$img_width.'px; height: '.$img_height .'px; border: 0;" alt=" " />';
349-
ImageDestroy($im);
350349

351350
return array('word' => $word, 'time' => $now, 'image' => $img, 'filename' => $img_filename);
352351
}

system/libraries/Image_lib.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -840,10 +840,6 @@ public function image_process_gd($action = 'resize')
840840
return FALSE;
841841
}
842842

843-
// Kill the file handles
844-
imagedestroy($dst_img);
845-
imagedestroy($src_img);
846-
847843
if ($this->dynamic_output !== TRUE)
848844
{
849845
chmod($this->full_dst_path, $this->file_permissions);
@@ -1045,10 +1041,6 @@ public function image_rotate_gd()
10451041
return FALSE;
10461042
}
10471043

1048-
// Kill the file handles
1049-
imagedestroy($dst_img);
1050-
imagedestroy($src_img);
1051-
10521044
chmod($this->full_dst_path, $this->file_permissions);
10531045

10541046
return TRUE;
@@ -1124,9 +1116,6 @@ public function image_mirror_gd()
11241116
return FALSE;
11251117
}
11261118

1127-
// Kill the file handles
1128-
imagedestroy($src_img);
1129-
11301119
chmod($this->full_dst_path, $this->file_permissions);
11311120

11321121
return TRUE;
@@ -1255,9 +1244,6 @@ public function overlay_watermark()
12551244
return FALSE;
12561245
}
12571246

1258-
imagedestroy($src_img);
1259-
imagedestroy($wm_img);
1260-
12611247
return TRUE;
12621248
}
12631249

@@ -1426,8 +1412,6 @@ public function text_watermark()
14261412
$this->image_save_gd($src_img);
14271413
}
14281414

1429-
imagedestroy($src_img);
1430-
14311415
return TRUE;
14321416
}
14331417

system/libraries/Upload.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,6 @@ protected function _file_mime_type($file)
12311231
if ($finfo !== FALSE) // It is possible that a FALSE value is returned, if there is no magic MIME database file found on the system
12321232
{
12331233
$mime = @finfo_file($finfo, $file['tmp_name']);
1234-
finfo_close($finfo);
12351234

12361235
/* According to the comments section of the PHP manual page,
12371236
* it is possible that this function returns an empty string

system/libraries/Xmlrpc.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,10 +1185,8 @@ public function parseResponse($fp)
11851185
xml_get_current_line_number($parser));
11861186

11871187
$r = new XML_RPC_Response(0, $this->xmlrpcerr['invalid_return'], $this->xmlrpcstr['invalid_return']);
1188-
xml_parser_free($parser);
11891188
return $r;
11901189
}
1191-
xml_parser_free($parser);
11921190

11931191
// Got ourselves some badness, it seems
11941192
if ($this->xh['isf'] > 1)

system/libraries/Xmlrpcs.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,13 @@ public function parseRequest($data = '')
262262
sprintf('XML error: %s at line %d',
263263
xml_error_string(xml_get_error_code($parser)),
264264
xml_get_current_line_number($parser)));
265-
xml_parser_free($parser);
266265
}
267266
elseif ($parser_object->xh['isf'])
268267
{
269268
return new XML_RPC_Response(0, $this->xmlrpcerr['invalid_return'], $this->xmlrpcstr['invalid_return']);
270269
}
271270
else
272271
{
273-
xml_parser_free($parser);
274-
275272
$m = new XML_RPC_Message($parser_object->xh['method']);
276273
$plist = '';
277274

0 commit comments

Comments
 (0)