Answer the question
In order to leave comments, you need to log in
Fix function create() on null?
Getting started with CakePHP
When executing a line, <?php echo $form->create('Task');?>
it gives an error
Call to a member function create() on null
Error: An Internal Error Has Occurred
Can you tell me how to fix it?
Answer the question
In order to leave comments, you need to log in
Check if the $form object is initialized (it is not initialized for you).
Head-on solution:
<?php echo ($form ? $form->create('Task') : ''); ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question