decibel.places

decibel.places's picture

Fix for hook_form_alter returns WSOD - remove brackets around new element array members and add $form_state to function

  1. /* Implements hook_form_alter */
  2.  
  3. function back_button_form_alter (&$form, $form_state, $form_id){
  4. if ($form_id == 'video_node_form'){
  5.   $form['back']= array(
  6.         '#type' => 'submit',
  7.         '#value' =>
decibel.places's picture

cURL script does not work in Rules Custom PHP Action, works fine in Devel Execute PHP or as file

  1. function sendRequest($adixml)
  2. {
  3.     $adich = curl_init();
  4.     curl_setopt($adich, CURLOPT_URL, "http://manage.encoding.com/");
  5.     curl_setopt($adich, CURLOPT_POSTFIELDS, "xml=" .
decibel.places's picture

hook_form_alter returns WSOD when $form_id is checked, $form_id is returned as an array,works on all forms without $form_id test

  1. /* Implements hook_form_alter */
  2.  
  3. function back_button_form_alter (&$form, $form_id){
  4. if ($form_id == 'video_node_form'){
  5.   $form['back']= array(
  6.         ['#type'] => 'submit',
  7.         ['#value'] => t('Make C
Syndicate content