projects
/
acontent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c748a6
)
4888: ims_import.php: prevent "Undefined index: -1" warning
author
TJ
<acontent@iam.tj>
Mon, 10 Oct 2011 14:41:41 +0000
(15:41 +0100)
committer
TJ
<acontent@iam.tj>
Wed, 19 Oct 2011 19:10:22 +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
57ba69c
..
54f962b
100644
(file)
--- a/
home/ims/ims_import.php
+++ b/
home/ims/ims_import.php
@@
-455,7
+455,7
@@
function removeCommonPath($items){
global $course_primary_lang;
// get language from CONTENT PACKAGE
- if (substr($element_path[count($element_path)-1], -6) == ':title' && substr($name, -11) == ':langstring') {
+ if (
count($element_path) > 0 &&
substr($element_path[count($element_path)-1], -6) == ':title' && substr($name, -11) == ':langstring') {
$course_primary_lang = trim($attrs['xml:lang']);
}