I have created a module, and I am trying to use the following code:
function mymodule_form_alter(&$form, &$form_state, $form_id) {
if ($form_state['view']->name == 'album1') {
// ...
}
// ...
}
The line that causes the error is the following one:
if ($form_state['view']->name == 'album1') {
The error I get is the following one:
Notice: Trying to get property of non-object in mymodule_form_alter() (line 15 of C:\xampp\htdocs\drupal\sites\all\modules\mymodule\mymodule.module).