I'm new to Drupal development and trying to run a preprocess function for a content type inside my custom theme's template.php
.
Here's my code:
function MYTHEME_preprocess_article(&$variables) {
if (!field_image_alt_text->getValue().strlen() = 0 || null ) { set value to something }else {return;}
};
but it returns a syntax error as:
Syntax Error: Unexpected T_OBJECT_OPERATOR
How can I . resolve this error?
Thanks in advance!
u dont resolve this, code not php language
function MYTHEME_preprocess_article(&$variables) {
if (strlen(field_image_alt_text->getValue()) = 0 || null ) { set value to something }else {return;}
};