thedigicraft / Atom.CMS

Atom.CMS
56 stars 50 forks source link

Title Error and New Page Warning #48

Closed StnCham closed 10 years ago

StnCham commented 10 years ago

Alright, so I have, in the title bar of the browser, a giant bare bones block of code ( <br /> <font size='1'><table class='xdebug-error xe-warning' [...] p | AtomCMS 2.0 that reads out Warning: Illegal string offset 'title' saying it's in my header file.

This is the code in my header: <?php echo $page['title'] . ' | ' . $site_title; ?>

Second, when I add a new page, it gives me a warning (Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result) for data.php $data = mysqli_fetch_assoc($r);, but still adds the page.

I'm not at all aware how to solve the title issue or the warning.

I just found this 'new page warning' while working on videos 68 through 72. I'm not exactly sure when it happened. The title page error has been there since somewhere in the 50 numbered videos.

thedigicraft commented 10 years ago

They are both connected (I believe).

Because of the mysqli_fetch_assoc() error, you are not giving the $page array any values.

Offset is referring to the ['title'] key in the $page array. $page['title']

You are sending an empty value to the data_page($dbc, EMPTY) function. So the id is not being sent to it via the url.