$subpart is always empty here. The page number is in list array
check for array before using array functions
Merge pull request #18 from albig/fix-phpwarnings

Fix phpwarnings
Merge branch 'master' into add-type-switch
include docTypeCheck only in FE context