I'm hacking into a wordpress plugin. Since I'm inside a plugin that posts tweets, I use something like echo or print. I've identified one line that causes the problem, but not sure what exactly it is, since I can't print or echo.
$tagarray = wp_get_post_tags( $post_id); //returns an array
$tags = "tag:";
if (count($tagarray) > 0){
foreach ( $tagarray as $tag ){
//$tags .= "mytag "; // This line works when quotes are removed.
//$tags = strval($tag); //This doesn't.
}
}
I've tried various manipulations of $tag, like casting etc, but nothing works. Any ideas on how to debug? My last resort would be to publish print values to a file. Any other ideas?