mirror of
https://github.com/moodle/moodle.git
synced 2025-05-29 03:57:03 +02:00
Error checking on image writes
This commit is contained in:
parent
b913b369e8
commit
f10ed36d8d
@ -113,9 +113,12 @@ function save_user_image($userid, $filename) {
|
|||||||
ImageLine ($im2, 34, 34, 34, 0, $black2);
|
ImageLine ($im2, 34, 34, 34, 0, $black2);
|
||||||
ImageLine ($im2, 34, 0, 0, 0, $black2);
|
ImageLine ($im2, 34, 0, 0, 0, $black2);
|
||||||
|
|
||||||
ImageJpeg($im1, "$CFG->dataroot/users/$userid/f1.jpg", 90);
|
if (ImageJpeg($im1, "$CFG->dataroot/users/$userid/f1.jpg", 90) and
|
||||||
ImageJpeg($im2, "$CFG->dataroot/users/$userid/f2.jpg", 95);
|
ImageJpeg($im2, "$CFG->dataroot/users/$userid/f2.jpg", 95) ) {
|
||||||
return 1;
|
return 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user