Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8400445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:33:43+00:00 2026-06-09T21:33:43+00:00

I am confused as to why this error is occurring, if someone can please

  • 0

I am confused as to why this error is occurring, if someone can please help

foreach ( $filters as $_filter )
{  
    switch ($_filter[1])
    {   
        case "/FlateDecode" :
            if (function_exists("gzuncompress") )
            {   echo 'testing1';
                $xrefStreamData = 0 < strlen( $xrefStreamData ) ? gzuncompress( @$xrefStreamData ) : "";
            }
            else
            {
                $this->error( sprintf( "To handle %s filter, please compile php with zlib support.", $_filter[1] ) );
            }
            if ( $xrefStreamData === false )
            {  echo 'testing2';
                $this->error( "Error while decompressing stream." );
            }
            break;

        case "/LZWDecode" :
                echo 'testing3';
            include_once( "filters/FilterLZW_FPDI.php" );
                 //does not go through
            $decoder = new FilterLZW_FPDI( $this->fpdi );
            $xrefStreamData = $decoder->decode( $xrefStreamData );
            break;
        case "/ASCII85Decode" :
            echo 'testing4';
            include_once( "filters/FilterASCII85_FPDI.php" );
            $decoder = new FilterASCII85_FPDI( $this->fpdi );
            $xrefStreamData = $decoder->decode( $xrefStreamData );
            break;
        case null :
            break;
    }
    $this->error( "Unsupported Filter: %s", $_filter[1] );
}

I set the echos to debug to see which loops its going through, the output i am getting is
testing1 unsupported Filter %s

does this mean the array $_filter is null? if it is null why is it going into the foreach loop in the first place?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:33:44+00:00Added an answer on June 9, 2026 at 9:33 pm

    Your code is fine. The line:

    $this->error( "Unsupported Filter: %s", $_filter[1] );
    

    is after all the condition checks in the case statement and hence will always print out!

    What you should do is, put it under a default clause like so:

    ...
    case null :
         break;
    
    default:
         $this->error( "Unsupported Filter: %s", $_filter[1] );
         break;
    

    BTW, I dont know what case null: is for, but I would actually replace that with default.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a little confused as to why this doesn't give an error. I found
I get a compile error, which I'm slightly confused about. This is on VS2003.
I'm pretty confused by this one and can't think of anything obvious that I
I'm very confused with this error, it shows when I try to return a
In general I know why you get this error, but I'm a little confused
I am confused why my app is crashing with this error. I have implemented
I've done some research online with this problem, and i'm totally confused. If someone
Im running into this error that I can't work out Im writing some code
Now I am totally confused by this error message: Android library projects cannot be
Getting this error building a C++ project in VS2008. Very confused what it means,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.