Ignore:
Timestamp:
Oct 24, 2008, 5:16:59 PM (12 years ago)
Author:
nico
Message:
  • Change return value for function (success return (bool) true):

pipi_load, pipi_save, pipi_command, pipi_render_histogram,
pipi_get_image_histogram

  • Add pipi's php constants definitions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi-php/examples/pipi.php

    r3086 r3087  
    2323               
    2424                $cmd_argc = $list[$cmd_name];
    25                 if ($argi + $cmd_argc > $argc) {
    26                         die("too few arguments for $arg_name\n");
     25                if ($argi + $cmd_argc + 1 > $argc) {
     26                        die("too few arguments for $cmd_name\n");
    2727                }
    2828
     
    3737                                die();
    3838                }
    39                 if ($res != 0) {
     39                if (!$res) {
    4040                        die("command $cmd_name failed\n");
    4141                }
     
    4343        }
    4444        else {
    45                   if (pipi_command($ctx, "load", $arg) != 0)
     45                  if (!pipi_command($ctx, "load", $arg))
    4646                        die("could not load $arg\n");
    4747        }
Note: See TracChangeset for help on using the changeset viewer.