$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