diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js index 8e098f4eab..9591fc67d1 100644 --- a/phpBB/adm/style/editor.js +++ b/phpBB/adm/style/editor.js @@ -33,7 +33,7 @@ function getarraysize(thearray) { for (i = 0; i < thearray.length; i++) { - if (thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null) + if (typeof thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null) { return i; } @@ -208,7 +208,7 @@ function addquote(post_id, username) theSelection = document.selection.createRange().text; } - if (theSelection == '') + if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null) { if (document.all) { diff --git a/phpBB/styles/subSilver/template/editor.js b/phpBB/styles/subSilver/template/editor.js index a3bd341ab0..e93ca0e51d 100644 --- a/phpBB/styles/subSilver/template/editor.js +++ b/phpBB/styles/subSilver/template/editor.js @@ -33,7 +33,7 @@ function getarraysize(thearray) { for (i = 0; i < thearray.length; i++) { - if (thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null) + if (typeof thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null) { return i; } @@ -208,7 +208,7 @@ function addquote(post_id, username) theSelection = document.selection.createRange().text; } - if (theSelection == '') + if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null) { if (divarea.innerHTML) {