FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » FIX: FUDAPI niggles
Show: Today's Messages :: Unread Messages :: Polls :: Message Navigator
| Unsubscribe from topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
FIX: FUDAPI niggles [message #187830] Wed, 27 November 2019 17:21 Go to next message
BugLaden is currently offline  BugLaden   Canada
Messages: 216
Registered: February 2002
Location: Westminster, MD
Karma: 0
Senior Member
remove from buddy list
stop ignoring messages by this user
Been hitting the FUDAPI pretty hard, integrating it into my site.

Have run across these two bugs:

1) When fud_new_topic() or fud_new_reply() is called a
Notice (8): Undefined index: usr [ROOT/FUDforum/include/theme/default/isearch.inc, line 18]
is thrown.

This is because $GLOBALS['usr']->lang is not set because it is coming from out of the environment. I changed the line to:
$lang = isset($GLOBALS['usr']->lang) ? $GLOBALS['usr']->lang : '';


2) When fud_new_topic() or fud_new_reply() is called a
Warning (512): Unable to emit headers. Headers sent in file=/home2/bugladen/cake/tobacconerd/FUDforum/include/theme/default/post_proc.inc line=730 [CORE/src/Http/ResponseEmitter.php, line 51]
is thrown.

This is because there is an extra CRLF at the bottom of the file. I removed that extra linefeed.

Diff file attached. This is against 3.1 FYI.
  • Attachment: patch.diff
    (Size: 0.80KB, Downloaded 856 times)


-=BugLaden

[Updated on: Wed, 27 November 2019 17:22]

Report message to a moderator

Re: FIX: FUDAPI niggles [message #187834 is a reply to message #187830] Mon, 16 December 2019 09:14 Go to previous message
naudefj is currently offline  naudefj   United States
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Great patch! Thank you so much.

PS: I cannot apply it right away, but will do so later.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: BUG & Fix: Cleaning up GLOBALS.php $INCLUDE remnants
Next Topic: FUDAPI: Creating a forum?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 12 12:25:33 EST 2024

Total time taken to generate the page: 0.03824 seconds