Results 1 to 2 of 2

Thread: Need Help With PHP on wordpress blog

  1. #1
    Join Date
    Nov 2008
    Posts
    10

    Need Help With PHP on wordpress blog

    Fatal error: Cannot use object of type stdClass as array in /home2/firstsi1/public_html/halonight/wp-content/plugins/easysms/post_publish.php on line 8



    this is the error that i get when i try to publish a post using easysms. I need desperate help and fast. I will give administrator access to someone to help.

  2. #2
    Join Date
    Nov 2008
    Posts
    10

    this is the text that has the error on line 8

    <?php
    function easysmspost($post_ID){
    $postpub = get_option('sms_publish_post');
    if ($postpub == "yes"){
    $the_post = get_post($post_ID);
    if($the_post->post_date_gmt == $the_post->post_modified_gmt)
    {
    $title = stripslashes($the_post['Title']);
    $sql = "SELECT * FROM easysms WHERE confirm = 'yes'";
    $result = mysql_query($sql);
    $num_rows = mysql_num_rows($result);
    while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
    $sql = "SELECT * from easysms_carriers WHERE ID = '".$row[carrierEmail]."'";
    $result1 = mysql_query($sql);
    while($row1 = mysql_fetch_array($result1, MYSQL_ASSOC)){
    $from = "From: ". get_option('sms_from_name') . " <" . get_option('sms_from_email') . ">\r\n";
    $subject = "New post at ".get_bloginfo('name')." ";
    $message = $title." - Visit ".get_bloginfo('url');
    $to = $row['phoneNumber']."@".$row1["carrierEmail"];
    mail($to, $subject, $message, $from);
    }
    }
    }
    return $post_ID;
    }

    }
    ?>

Similar Threads

  1. Help w/Wordpress Blog Template
    By natalie1 in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 19 Nov 2008, 12:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •