Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11214

generate_text_for_display

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 3.0.11
    • Posting
    • None

      generate_text_for_display generates a blank text if the string given is '0'

      here is the original topic:
      https://www.phpbb.com/community/viewtopic.php?f=71&t=2165721&p=13201640#p13201648

      and here the summary:
      [quote="A_Jelly_Doughnut"]That would be a bug in generate_text_for_display.

      [code]function generate_text_for_display($text, $uid, $bitfield, $flags)
      {
      static $bbcode;

      if (!$text)

      { return ''; }

      [/code]
      In PHP:
      [code]
      <?php
      $str = '0';
      if (!$str)

      { echo "String evaluates to false\n"; }

      [/code]
      will print "String evaluates to false.
      So the code in generate text_for_display is simply returning a blank string.

      Feel free to file a bug in the phpBB tracker: http://tracker.phpbb.com/[/quote]

            Unassigned Unassigned
            woipi90 woipi90 [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: