From b8b605cff0d54d8b5570c4fabb617d74dc72813c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Feb 2026 13:30:42 +0000 Subject: [PATCH] Improve accessibility and file handling in CRUD Co-authored-by: naielv <109038805+naielv@users.noreply.github.com> --- public_html/entreaulas/alumnos.php | 14 ++++++++------ public_html/entreaulas/aulario.php | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public_html/entreaulas/alumnos.php b/public_html/entreaulas/alumnos.php index 8acbbf7..b27073a 100644 --- a/public_html/entreaulas/alumnos.php +++ b/public_html/entreaulas/alumnos.php @@ -82,8 +82,9 @@ switch ($_GET["form"] ?? '') { // Validate image $image_info = getimagesize($tmp_name); if ($image_info !== false) { - move_uploaded_file($tmp_name, $photo_path); - chmod($photo_path, 0644); + if (move_uploaded_file($tmp_name, $photo_path)) { + chmod($photo_path, 0644); + } } } @@ -133,8 +134,9 @@ switch ($_GET["form"] ?? '') { // Validate image $image_info = getimagesize($tmp_name); if ($image_info !== false) { - move_uploaded_file($tmp_name, $photo_path); - chmod($photo_path, 0644); + if (move_uploaded_file($tmp_name, $photo_path)) { + chmod($photo_path, 0644); + } } } @@ -223,7 +225,7 @@ switch ($_GET["action"] ?? '') {
+