View Single Post
Old 04-21-2009, 12:20 PM   #113
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by Mnementh View Post
ilovejedd, when using your ffnet.source.php code printed a few messages above to try and create an epub using the cli I get the following error message:

Warning: Invalid argument supplied for foreach() in C:\...\html.codec.php on line 73

The line in question is: foreach($story['meta']['chapters'] as $key => $title) {

I've tried it with every copy of html.codec.php I have and although the line numbers are different it falls over at the same bit of code everytime.

I tried changing $title to $chaptitle as it is in ffnet.source.php just in case it was something as simple as that with no joy.
Oh, whoops.

My mistake, change:
PHP Code:
function ffnet_get_story($storyid$meta true) { 
to
PHP Code:
function ffnet_get_story($storyid$meta false) { 
I kinda also use this for creating cover images and $meta=true means it only retrieves metadata but not the actual pages/chapters. I really should change the default behavior in the script to retrieve all chapters unless specified to get metadata only. By the way, undo any changes you made to html.codec.php. That might actually break some things.

*sigh* Really should start working on that clean source.
ilovejedd is offline   Reply With Quote