Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error: Call to undefined function: tep_array


tammy507

Recommended Posts

Im currently in the admin under: Shipping ---> Orders to Process

 

I am getting the following error:

 

Fatal error: Call to undefined function: tep_array_merge() in /var/www/html/store/admin/orders.php on line 334

 

I checked line 334 and it says this:

 

<td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . tep_draw_pull_down_menu('status', tep_array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), '', 'onChange="this.form.submit();"'); ?></td>

 

 

Any ideas of whats wrong, or what it should say?

 

Thanks in advance!

Tammy

Link to comment
Share on other sites

change to array_merge instead of tep_array_merge

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I am having errors everywhere!!!

 

Heres another:

Admin-->Shipping-->Process--> SHIPPING PROCESSING

 

 

Fatal error: Call to undefined function: tep_array_merge() in /var/www/html/store/admin/spg_shipping.php on line 728

 

 

 

Line 728 says:

<td class="smallText" align="right"><?php echo HEADING_TITLE_STATUS . ' ' . tep_draw_pull_down_menu('status', tep_array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), '', 'onChange="this.form.submit();"'); ?></td>

Link to comment
Share on other sites

Ok... I had the same tep error thing in the file spg_manual_info.php so I changed it, THAT error went away and has been replaced with this:

 

 

Warning: main(includes/modules/spg_shipping/key_generateb.php): failed to open stream: No such file or directory in /var/www/html/store/admin/spg_manual_info.php on line 194

 

Fatal error: main(): Failed opening required 'includes/modules/spg_shipping/key_generateb.php' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/store/admin/spg_manual_info.php on line 194

 

 

 

Line 194 says: require(DIR_WS_SPG_SHIPPING . 'key_generateb.php');

 

 

I checked and dont see anything that says DIR_WS or key_gen

Link to comment
Share on other sites

Ok... I found it.. the file says :

 

 

<?php

 

function RandomPassword( $passwordLength ) {

$newkey2 = "";

 

for ($index = 1; $index <= $passwordLength; $index++) {

// Pick random number between 1 and 62

$randomNumber = rand(1, 62);

// Select random character based on mapping.

if ($randomNumber < 11)

$newkey2 .= Chr($randomNumber + 48 - 1); // [ 1,10] => [0,9]

else if ($randomNumber < 37)

$newkey2 .= Chr($randomNumber + 65 - 10); // [11,36] => [A,Z]

else

$newkey2 .= Chr($randomNumber + 97 - 36); // [37,62] => [a,z]

}

return $newkey2;

}

$passwordLength = 24 ;

$newkey2=RandomPassword($passwordLength);

 

tep_db_query("update " . TABLE_SPG_MANUAL_INFO . " set spg_man_key2 = '" . $newkey2 . "' , spg_man_key3 = '" . $osCAdminsID . "' where spg_man_info_id = '1' ");

 

?>

Link to comment
Share on other sites

Change 'tep_array_merge' to 'array_merge'.
That worked out great! for my problem... Question is why would removing tep_ have any affect on the array?

It doesn't. It does handle the fact that osCommerce dropped the tep_array_merge function in favor of providing their own definition of array_merge when available.

 

There used to be a function tep_array_merge that said something along the lines of "if array_merge is defined, use it; otherwise, use this code that has the same effect." This was replaced by code that says "if array_merge is not defined, use this definition for it." At the same time, all references to tep_array_merge (in the core code) were replaced with array_merge.

 

Hth,

Matt

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...