The PP restore glitch, not to be confused with the Transform PP restore glitch is a natural glitch in Pokémon Red, Blue, Yellow.
In Red, Blue and Yellow, if the player uses a Max Ether on a move with max PP that has at least one PP Up boost applied to it, the game won't display the message "It won't have any effect." and will go ahead and 'restore PP' even though the PP was at its max. The item will be wasted as nothing will happen.
The same glitch applies for Max Elixer if the player has all moves at full PP but at least one with a PP Up boost applied.
This glitch does not apply to Ethers or Elixers, which will display the message "It won't have any effect." if the move you use the Ether on had full PP and at least one PP Up boost applied, or if you use an Elixer with full PP and at least one move with a PP Up boost applied.