projects
/
acontent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64a82d8
)
4888: ims_import.php: prevent "Undefined index: type in checkResources()
author
TJ
<acontent@iam.tj>
Mon, 10 Oct 2011 15:13:36 +0000
(16:13 +0100)
committer
TJ
<acontent@iam.tj>
Wed, 19 Oct 2011 19:10:23 +0000
(20:10 +0100)
home/ims/ims_import.php
patch
|
blob
|
history
diff --git
a/home/ims/ims_import.php
b/home/ims/ims_import.php
index
1ecf8e8
..
785dc24
100644
(file)
--- a/
home/ims/ims_import.php
+++ b/
home/ims/ims_import.php
@@
-237,7
+237,7
@@
function checkResources($import_path){
}
//validate the xml by its schema
- if (preg_match('/imsqti\_(.*)/', $fileinfo['type'])){
+ if (
isset($fileinfo['type']) &&
preg_match('/imsqti\_(.*)/', $fileinfo['type'])){
$qti = new QTIParser($fileinfo['type']);
$xml_content = @file_get_contents($import_path . $fileinfo['href']);
$qti->parse($xml_content); //will add error to $msg if failed