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

Home » FUDforum Development » Plugins and Code Hacks » FIX: FUDAPI niggles
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
FIX: FUDAPI niggles [message #187830] Wed, 27 November 2019 22:21 Go to next message
BugLaden is currently offline  BugLaden   Canada
Messages: 216
Registered: February 2002
Location: Westminster, MD
Karma: 0
Senior Member
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 785 times)


-=BugLaden

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

Report message to a moderator

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

PS: I cannot apply it right away, but will do so later.
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Fri Apr 19 18:27:00 GMT 2024

Total time taken to generate the page: 0.02476 seconds